Subject: Re: sparse core dumps?
To: Hubert Feyrer <email@example.com>
From: Matt Thomas <firstname.lastname@example.org>
Date: 06/02/2004 15:25:05
On Jun 2, 2004, at 2:25 PM, Hubert Feyrer wrote:
> When I malloc(3) some space, it doesn't have a significant impact on
> program's memory usage, i.e. I can happily request 1GB and nothing will
> But as soon as a core dump gets created, it seems that pages are
> just to dump them out - looking at core dump sizes indicates this.
> What's really bad is that the system's performance is _really_ bad
> writing out that core dump.
> To illustrate, run the program below with some different values (10000,
> 100000, 1000000, 10000000, ..) and look at the resulting core sizes.
> Plus observe system performance during the core dump.
> Would it be possible to allow core dumps to be "sparse"?
I've proposed before that a read-only access to a demand zero page does
not allocate a new page, but instead generates a copy-on-write reference
to a zero-page. (instead of allocating a free page and placing a
writable page into the vmspace).
The other alternative is to make the coredump code much more
about uvm internals so it can create sections akin to .bss (ALLOC but no
Matt Thomas email: email@example.com
3am Software Foundry www: http://3am-software.com/bio/matt/
Cupertino, CA disclaimer: I avow all knowledge of this