core dumps are HUGE...

Jason Evans jasone at FreeBSD.org
Wed Mar 22 18:24:11 UTC 2006


John Baldwin wrote:
> I think the better path is to provide sparse coredumps.  I.e., when dumping a
> core, leave the parts of the process map that are mapped but have no backing
> store yet (b/c the pages haven't been touched) sparse by not writing to them,
> but just seeking past them.  This doesn't require complicating the malloc
> implementation just for the sake of a core dump on a CF device.

I like this solution too.  I'm sure there are people who could make this 
change with much less effort than me though. =)

It looks like the necessary changes are in 
sys/kern/imgact_elf.c:coredump().  That code writes a segment at a time, 
but it would need to be modified to look at the process's page map and 
write segments piecemeal.

Jason


More information about the freebsd-current mailing list