Re: 'disposable' dirty pages [was: Out Of Memory in v. 2.1]
Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Thu, 08 Oct 1998 17:52:04 -0300
In message <Pine.LNX.3.95.981008084640.1111A-100000@chaos.analogic.com>,
"Richa
rd B. Johnson" writes:
+-----
| On Thu, 8 Oct 1998, Cameron Simpson wrote:
| > On 7 Oct 1998, in message <Pine.GSO.3.96.981007120041.28599A-100000@ultra5>
| > Ely Wilson <plexus@ionet.net> wrote:
| > | Hmm, I'm wondering. I haev this application, it allocates 10 blocks each
| > | 1 megs in size. Then I free() 5 of those blocks, but the program is stil
| > | eating 10 megs of memory.
| > | Is this right?
| >
| > Well, it's "normal". UNIX processes generally only grow.
|
| glibc seems to give back memory. Here I allocate some memory, I don't
+--->8
That's why glibc uses mmap() for large pages. All it has to do when they're
freed is undo the mmap(), and the memory goes straight back to the OS.
--
brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/