Reputation: 2068
I have a core dump file generated by a c++ program.
I suspect the reason it crashed is because it was running out of memory. Is there a way the get the amount of memory in use from the core file using gdb (or any other way)?
Upvotes: 5
Views: 7684
Reputation: 67713
As a rough approximation, most of the data in a large core file should be the heap + stack(s).
External mmaps and executable code aren't copied in, so the total size should be close to the total process size before it died.
Upvotes: 1
Reputation: 47762
According to this thread, it is not possible.
However, you can use size -A core
to get the sizes of individual sections of the core dump (you won't know what they are, though).
Upvotes: 1