From owner-freebsd-hackers Sat Mar 16 9:48:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from tarantula.cse.Buffalo.EDU (tarantula.cse.Buffalo.EDU [128.205.39.16]) by hub.freebsd.org (Postfix) with ESMTP id 6E9C837B404 for ; Sat, 16 Mar 2002 09:44:23 -0800 (PST) Received: (from rc27@localhost) by tarantula.cse.Buffalo.EDU (8.11.6+Sun/8.10.1) id g2GHiMN11376; Sat, 16 Mar 2002 12:44:22 -0500 (EST) Date: Sat, 16 Mar 2002 12:44:22 -0500 (EST) From: Ramkumar Chinchani To: mark tinguely Cc: Subject: Re: Memory management bug in FreeBSD 4.5 RELEASE In-Reply-To: <200203161730.g2GHUPp39177@web.cs.ndsu.nodak.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 But why does this not happen after i = 32 ? I hardly see any increase in memory usage after that. -Ram ==> mark tinguely /11:30am/Mar 16, 2002 <== [> 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