From: gwtmp01@... Date: 2006-08-29T12:37:46+09:00 Subject: Re: Can Anyone Explain This Memory Leak? On Aug 26, 2006, at 8:14 AM, Zed Shaw wrote: > So, a posting to a news group from some guy in 2001 (5 years old) > and a > paper written in 1995 (11 years old) that has references to papers as > old as 1964, none of which say that measurements of RAM will behave as > I've demonstrated *today*. Then more usenet postings (still no C code > that demonstrates this magic), and finally a recent article from > linuxjournal describing the Linux memory, but nothing that really says > memory will stay around at 80M levels even 20-30 seconds after all ram > has been supposedly freed. Run your code under a process trace program such as ktrace (Mac OS X). You should be able to easily grep the resulting dump for system calls that *actually* return memory to the OS. Just because free is called doesn't mean that the memory allocator has actually notified the kernel that it no longer needs that huge hunk of memory. I'm guessing you'll look for calls to munmap or something similar. Gary Wright