Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 1997 21:03:04 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Eivind Eklund <perhaps@yes.no>
Cc:        "Andrew Atrens" <atrens@nortel.ca>, hackers@freebsd.org, freebsd-bugs@freebsd.org
Subject:   Re: Bug in malloc/free (was: Memory leak in getservbyXXX?) 
Message-ID:  <7810.874868584@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 21 Sep 1997 19:37:02 %2B0200." <199709211737.TAA20833@bitbox.follo.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199709211737.TAA20833@bitbox.follo.net>, Eivind Eklund writes:
>[Andrew Atrens]
>> >From what I can tell Poul your free() actually gives the memory back to the
>> OS ( at least some of the time ).
>
>If this is correct, it breaks ANSI C behaviour.  (Yes, I hate this
>ANSI C requirement as much as the next guy - but still thought I
>should inform about it.)

Bugger off :-)

We merely tell the OS that we're not interested in the contents of 
the page.  It's cheaper to zero-fill than to page out and back in.

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7810.874868584>