Julian Elischer <[EMAIL PROTECTED]> writes:
> Dag-Erling Smørgrav wrote:
> > Are you saying that mmap() is not constrained by maxdsiz?
> that seems to be the case from my experience.
That's bad. Our new malloc() uses mmap() to allocate arenas, which
means that dsiz no longer has any effect. I've just confirmed this:
# phkmalloc on 5.4 / i386
% ulimit -d
524288
% ./allocate
511
# jemalloc on 7.0 / i386
% ulimit -d
524288
% ./allocate
697
# jemalloc on 7.0 / amd64
% ulimit -d
524288
% ./allocate
1844^C
Note the discrepancy on 7.0 / i386 - it does stop, but only after
exceeding dsiz by about 50%. On amd64, it'll happily keep going until
it hits vsiz, which is unlimited by default.
DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
int i = 0;
while (malloc(1048576) != NULL) {
printf("\r%d", ++i);
fflush(stdout);
}
printf("\n");
exit(0);
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"