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? wondering, Gerd -- http://kraxel.fedorapeople.org/xenner/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2008-Aug-14 08:42 UTC
Re: [Xen-devel] mini-os: sbrk() doesn''t allocate pages?
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/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Aug-14 09:43 UTC
Re: [Xen-devel] mini-os: sbrk() doesn''t allocate pages?
Gerd Hoffmann, le Thu 14 Aug 2008 10:04:31 +0200, a écrit :> I can''t believe is is supposed to work that way.That''s how it usually works in unix environments :) Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel