Hello,

I'm encountering a problem with the stardard libc malloc/free library.
if a program allocates a huge (and temporary) amount of memory with
small structures then free it, the library gives back only a few pages
to the system.

>From the /usr/src/lib/libc/stdlib/malloc.c sources, it seems that this
is due to not shrinking/relocating pagedir pages (free_pages(), comment
around line 940). This means that returning pages stop at first
allocated pagedir.

It seems to be a problem also in some other Unixes, anyway, but i would
like to know if:

1) This is historical and must not be fixed.
2) This can be easily fixed.
3) Fixing it would lead to enormous problems. Better keep it like this.

Thanks.

RN.
IhM




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to