From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: mini-os: sbrk() doesn't allocate pages? Date: Thu, 14 Aug 2008 10:42:04 +0200 Message-ID: <48A3EFDC.5090403@redhat.com> References: <48A3E70F.90100@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48A3E70F.90100@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org Gerd Hoffmann wrote: > Hi, > > I'm wondering how the mini-os heap allocater work. The sbrk() function > in mm.c seems to *not* allocate pages for the heap. Instead it uses the > zero page and maps it into the heap space when a new page is needed ... > > I can't believe is is supposed to work that way. Is that a bug? Did I > miss some logic somewhere in the code? Oh, cow in the pagefault handler, that is the missing bit ... cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/