Subject: Re: free()
To: Erik Huizing <huizing@cpsc.ucalgary.ca>
From: Jason R Thorpe <thorpej@zembu.com>
List: netbsd-users
Date: 02/19/2001 08:16:05
On Sun, Feb 18, 2001 at 09:44:33PM -0700, Erik Huizing wrote:

 > After noticing one of my programs seemed to be accumulating memory, even
 > though I knew I was freeing it as it ran. So I wrote a small program,
 > which allocates a chunk of memory, uses it and frees it. I've watched what
 > happens on top, and the memory doesn't appear to get freed until the
 > program exists. 'ps' tells me the same story:

This is traditional (and typical) behaviour of a malloc(3) implementation.
However, you can change the behavior of NetBSD's malloc(3) -- see the
malloc(3) manual page.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>