From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] plan 9 overcommits memory? From: erik quanstrom Date: Sun, 2 Sep 2007 22:11:29 -0400 In-Reply-To: <13426df10709021847o1df19364j2d22a87d425c6505@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: b4c791d0-ead2-11e9-9d60-3106f5b1d025 > but most people can live with the overcommit, as witness the fact that > most of us do and never know it. > > If you can't live with overcommit, maybe you need a wrapper that: > sets up to catch the note (I am assuming here that you get one; do you?) > malloc > zero memory you malloc'ed (which will get the pages in) > die reasonably if you get the note but why introduce unpredictability? who really programs as if memory is not overcommited? i would bet that acme and most residents of /sys/src/cmd could do quite bad things to you in these cases. there's no waserror() in userland to wrap around memset. how much memory can be wasted by assuming that all brk'ed memory can be used? - erik