linux err wrote: > > Does anyone know what determines the size of a core > dump? I have a process running out of memory (it > allocates about 3GB) - but the size of core varies > (between 2-3GB) depending on how much the process > wrote on the allocated memory. > > Also, the time it takes to write the core (same size) > varies?? > > I briefly looked at elf_core_dump and get_user_pages() > in binfmt_elf.c. Is there any documentation on this? > Or anyone knows how it works? The relevant function seems to be maydump() (in binfmt_elf.c); this determines whether or not a given VM area should be dumped. Essentially, it doesn't dump data which can be obtained elsewhere, e.g. from an executable, shared library, unmodified mmap()d file, etc. Primarily, this prevents dumping the .text and .rodata segments of the executable and shared libraries, which will often account for most of a process' address space. -- Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html