From owner-freebsd-hackers Sun Sep 21 12:04:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA12779 for hackers-outgoing; Sun, 21 Sep 1997 12:04:10 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.26]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA12743; Sun, 21 Sep 1997 12:03:57 -0700 (PDT) Received: from critter.freebsd.dk (localhost.cybercity.dk [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id VAA07812; Sun, 21 Sep 1997 21:03:05 +0200 (CEST) To: Eivind Eklund cc: "Andrew Atrens" , hackers@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: Bug in malloc/free (was: Memory leak in getservbyXXX?) In-reply-to: Your message of "Sun, 21 Sep 1997 19:37:02 +0200." <199709211737.TAA20833@bitbox.follo.net> Date: Sun, 21 Sep 1997 21:03:04 +0200 Message-ID: <7810.874868584@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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."