Subject: sparse core dumps?
To: None <tech-kern@NetBSD.org>
From: Hubert Feyrer <firstname.lastname@example.org>
Date: 06/02/2004 23:25:59
When I malloc(3) some space, it doesn't have a significant impact on the
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 allocated
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 while
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"?
int main(int argc, char *argv)
long int n;
sscanf(argv, "%ld", &n);
printf("allocating %ld bytes\n", n);
p = malloc(n);
assert(p != NULL);
If wishes were wings, o" )~ would fly. -- Go www.NetBSD.org!