core dumps are HUGE...

Jason Evans jasone at freebsd.org
Tue Mar 21 23:21:28 UTC 2006


On Mar 21, 2006, at 2:20 PM, John-Mark Gurney wrote:
> Jason Evans wrote this message on Tue, Mar 21, 2006 at 14:16 -0800:
>> The core dump from the static binary is probably much smaller because
>> nothing ever calls malloc (no dynamic loader in the mix).
>
> Ummm.  you made the same mistake someone else did... The core dump
> from the static binary is not smaller, it's much larger..  Reread  
> above...

Okay then, invert the argument:  The core dump from the dynamic  
binary is probably much smaller because rtld never calls the libc  
malloc.

> And yes, I'm pretty sure that I have a world from before your  
> reduction
> in chunk size...  Having a minimum of a 6meg core doesn't sound like a
> good idea...  It's definately not going to play nice with small  
> systems..

I don't think that a 6 MB core file is the big deal you are making it  
out to be.  A 50 MB core file is a pain, mainly because it takes a  
long time to dump core.  Even so, consider that core dumps on OS X  
are in excess of 90 MB, and that this hasn't caused the world to stop  
revolving (though we should blame OS X for global warming).

If this is of real concern to you though, you might consider looking  
into modifying the dump code to leave holes in the core file for  
unmapped pages when dumping to UFS.  The vast majority of the core  
file is untouched pages in your simple test case.  I was actually  
surprised to find that dumping doesn't appear to do this.

Jason



More information about the freebsd-current mailing list