c++solariscoredumpcrash-dumps

Does the size of the core file reflects the memory usage when the application crashed?


My application (C++ on Sol 10 - 32 bit) crashed, and the size of the core dump generated by the application is 4 GB. Can I assume the application may use memory up to 4 GB (same as the size of the core file) when it is about to crash?

PS. My application is standalone and doesn't depend on any other processes.

Is there any way to check the total memory the application used, with the core file?


Solution

  • Yes, the core file represent a dump of the whole virtual memory area used by the process when the crash happened. You can't have more than a 4 GB core file with 32 bit processes.

    Under Solaris, you can use several commands located in /usr/proc/bin to get information from the core file. In particular:

    You can limit the set of data saved in a core file, among other things, by using the coreadm command. By default everything is saved:
    stack + heap + shm + ism + dism + text + data + rodata + anon + shanon + ctf