Memory problem

I'm just curious that I have an unix binary executable of about 9 MB. what is considered a great memory? the client will invoke this to generate some values ​​and a subsequent message queue elsewhere. I am just curious who is supposed to know when it is too large for the program to memory and then must provide as a static library instead of an executable?

+3
source share
5 answers

Everything is relative. This is a large size if the application runs on a machine with 8 MB of RAM. It is small if the application runs on a computer with 64 GB of RAM. Again, it can be large even on 64 GB of RAM, if most of the RAM was consumed by some huge instance of Oracle (for example).

It should also be noted that only part of these 9 MB is actually loaded into RAM - the readelf or objdump utilities can show you how accurately.

+5
source

It all depends on how much you get for 9MB. For example, if a file added several numbers, then it is certainly too large. However, 9MB is actually not so much these days, when the server can have more than 8 GB of memory.

, 50 .

+1

1996 ( ) /CAM , 32 50 . , 40 , . 1996 . , , , , .:-)

, "helloworld.exe", 9MB .

+1

. 9 , .

+1

1,5 . 174762 .

ram, , 9 ( ), , ram.

Otherwise, the executable loader will probably only load the parts that it needs if there are some resources or non-displayable parts of the binary that they do not need to be stored in ram for the entire runtime environment. In any case, you probably have at least 1-4 GB of RAM, so this is clearly not a problem ...

0
source

Source: https://habr.com/ru/post/1751026/


All Articles