[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: Is there a way to return memory to OS?
From: |
Mr. H. Xia |
Subject: |
Re: Re: Is there a way to return memory to OS? |
Date: |
Fri, 22 Apr 2005 20:01:02 +0100 |
Hi, Petter,
======= At 2005-04-21, 07:56:02 you wrote: =======
>
>[Hao Xia]
>> I have some temporary data has to be released and give the memory
>> back to OS.
>
>For large memory blocks, the GNU libc malloc() will use mmap to get
>the memory from the operating system, and this memory will be given
>back to the operating system when free() is called.
>
>The GNU libc malloc() is based on code from Doug Lea. You might want
>to read his articles on memory management.
I have read the memory manage part of glibc manual. It says "Occasionally, free
can actually return memory to the operating system and make the process
smaller."
But in my case (a small test case), the memory could be released with
glibc-2.2.5 on RH7.3 but not on RH9 with glibc-2.3.2. So I just wonder is this
an intentional "improvement" of glibc? If not, is it a bug?
As you suggested, I may have to spend some time to study the article of Doug
Lea.
At the meantime, could someone who is in charge of the glibc's upgrade
enlighten me on this? I appreciate it very much. If someone wanna check my test
code, I can put it in my later email.
Regard,
Hao