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)?
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With