From owner-freebsd-hackers Sat Mar 16 9:30:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id 8CB7537B419 for ; Sat, 16 Mar 2002 09:30:26 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g2GHUPp39177; Sat, 16 Mar 2002 11:30:25 -0600 (CST) (envelope-from tinguely) Date: Sat, 16 Mar 2002 11:30:25 -0600 (CST) From: mark tinguely Message-Id: <200203161730.g2GHUPp39177@web.cs.ndsu.nodak.edu> To: freebsd-hackers@FreeBSD.ORG, rc27@cse.Buffalo.EDU Subject: Re: Memory management bug in FreeBSD 4.5 RELEASE In-Reply-To: <200203161714.g2GHEcE11298@tarantula.cse.Buffalo.EDU> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > int i = 32; > > int > main(){ while (1) malloc(i); } > > > As long as i is in between 1 and 32, all memory is used up and all swap is used up, and then the process is killed. > > Again, when i > 32, all seems well. dirty at least a byte of the data: main(){ while (1) { char *p (char *) malloc(i); *p=0; } if the memory has not been dirtied, the system does not need to remember it when physical memory has been depleted. --mark. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message