[Scummvm-devel] ptmalloc3 in ScummVM?

Michael Druing michael at drueing.de
Fri Jun 23 02:24:54 CEST 2006


> On Do, Juni 22, 2006 13:29, Eugene Sandulenko wrote:
> > Hi guys,
> >
> > for several years I'm watching CrystalSpace project which 
> is a generic
> > 3D Engine. Recently they started to consider switching from
> > OS-dependent malloc to ptmalloc3 library.
> >
> >   http://www.malloc.de/en/
> >
> > According to
> > http://www.nedprod.com/programs/portable/nedmalloc/index.html
> > this research it will be considerable improvement on Win32, and of
> > course our beloved GP32 and PS2 which have deficient allocators.
> >
> 
> Uhm, AFAIK, ptmalloc3 requires sbrk, mmap and mprotect. 
> Somehow I doubt
> those are available on GP32 and PS2 (and probably not on 
> Win32 either)...

Win32 has mprotect (it's called VirtualProtect() there) and mmap (called
MapViewOfFile()).
Only sbrk() would need to be emulated; what *might* work is a call to
VirtualAlloc with the MEM_RESERVE parameter at program start, and subsequent
calls to VirtualAlloc() which actually commit the reserved memory. However,
I'm no expert there so I might be totally wrong :)

--Michael





More information about the Scummvm-devel mailing list