• Feyd@programming.dev
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    21 hours ago

    The size of the main binary and all the libraries loaded does determine the starting point of the memory usage, but then doing things like loading files are going to also use memory and there are many strategies for optimizing for speed, memory usage, disk size that have tradeoffs between them. Anyway the point is that the size of the program itself isn’t irrelevant even though it isn’t the only factor in memory usage.

    • CameronDev@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      18 hours ago

      Even the linked libraries may not contribute anything, if they are already loaded and shared amongst other processes. There are so many factors and trade offs that you cant really make any assumptions based off just the executable size.