[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/intern/guardedalloc MEM_guardedalloc.h blender/intern/guardedalloc/intern mallocn.c

Stealth Apprentice stealthapprentice at yahoo.com
Fri Feb 17 06:58:32 CET 2006


The mmap implementation in 

> a solution for windows :
> http://www.genesys-e.de/jwalter/mix4win.htm
 
is good and efficient (I've used it)...

It uses VirtualAlloc, which you can see gives you what
you need from mmap -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualalloc.asp



--- Jean-Luc Peuri�re <jlp at nerim.net> wrote:

> 
> Le 16 f�vr. 06 � 18:51, Ton Roosendaal a �crit
:
> 
> > ton (Ton Roosendaal) 2006/02/16 18:51:01 CET
> >
> >   Modified files:
> >     blender/intern/guardedalloc MEM_guardedalloc.h
> >     blender/intern/guardedalloc/intern mallocn.c
> >
> >   Log:
> >   Added new malloc type in our MEM module; using
> the unix feature  
> > 'mmap'.
> >
> > ...
> 
> >   Now here's mmap to the rescue! It has a very
> nice feature to map to
> >   a virtual (non existing) file, allowing to
> allocate disk-mapped  
> > memory
> >   on the fly. For as long there's real memory it
> works nearly as  
> > fast as
> >   a regular malloc, and when you go to the swap
> boundary, it knows  
> > nicely
> >   what to swap first.
> >
> >
> 
> 
> > ....
> 
> >   For Windows there's no mmap() available, but I'm
> pretty sure  
> > there's an
> >   equivalent. Windows gurus here are invited to
> insert that here in  
> > code! At
> >   the moment it's nicely ifdeffed, so for Windows
> the mmap defaults  
> > to a
> >   regular alloc.
> 
> 
> a solution for windows :
> http://www.genesys-e.de/jwalter/mix4win.htm
> 
> the complex code is for sbrk, mmap is simple
> 
> no idea if it is efficient, just happens i had the
> link handy ;)
> 
> JLuc
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-committers
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list