From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6c88126b59816363f35ee1d010e720b6@quanstro.net> From: erik quanstrom Date: Fri, 31 Aug 2007 07:41:57 -0400 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] plan 9 overcommits memory? Topicbox-Message-UUID: b2b9ae46-ead2-11e9-9d60-3106f5b1d025 i was trying to tickle a kernel panic, but instead i think i found a bug. this program was run on a machine with 1800 MB user space available. (3552/464510 user) #include #include enum{ Big = 1024*1024*1790, }; void main(void) { char *p; ulong i; p = malloc(Big); if(p == 0) sysfatal("malloc: %r"); memset(p, 0, Big); exits(""); } the result was ladd# out of physical memory; no swap configured 364: 8.out killed: out of memory 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? - erik