This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
malloc pre-allocated too much memory
- From: Victor Hsieh <victor at csie dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 18 Feb 2005 00:31:38 +0800
- Subject: malloc pre-allocated too much memory
Hi,
I'm running a service with very small memory usage (less than 500 KB)
but a large amount of servicing processes (more than 20 thousand).
Since we always work hard to reduce the memory usage, we've found that
gnu libc's malloc seems to pre-allocate about 128 KB of memory. (We found
this phenomenon because we add additional memory to the machine, but the
number of processes grew up in FreeBSD but Linux.) But in most case we
won't use that much, I think 5 KB are really enough for each process. So
there are a large ratio of unused memory. I would like to ask either any
suggestion, solution to reduce the pre-allocation, or any other good idea about this problem.
Many thanks to any opinion from you.
Regards,
Victor