From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] plan 9 overcommits memory? From: "Russ Cox" Date: Sun, 2 Sep 2007 17:27:35 -0400 In-Reply-To: <6c88126b59816363f35ee1d010e720b6@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070902212734.DF2D31E8C26@holo.morphisms.net> Topicbox-Message-UUID: b459540e-ead2-11e9-9d60-3106f5b1d025 > this means that the malloc *succeeded* it wasn't until i forced > the pagefault with the memset that i ran out of memory. what's > going on here? you know what's going on here. read the subject you wrote. the problem is not really as easy as it might seem at first. malloc just moves the brk, but the backing pages don't get allocated until the pages are accessed (during memset). you could argue for some kind of accounting that would ensure pages were available, but this could only be terribly pessimistic, especially in the case of stacks and fork. russ