Answer the question
In order to leave comments, you need to log in
How to find out how much memory an object takes?
There is an object, you need to determine how much memory it takes, is there any solution.
Only one option came to my mind, I took the amount of memory occupied by the process before the object was initialized and after throughps aux| grep <процесс>
Answer the question
In order to leave comments, you need to log in
I don’t think that this is a completely correct decision, the system can allocate more memory than the process requested (for example, allocate a whole page), or in general in ruby (I don’t know exactly) its own memory manager, which immediately asks the system for a large amount, and then resolves the memory under objects. You can try to poke around in the process memory in /proc or through /dev/mem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question