Nasty Evil Memory Fragmentation fix

Alexandre Julliard julliard at winehq.com
Wed Oct 10 12:10:53 CDT 2001


Gavriel State <gav at transgaming.com> writes:

> We ended up creating a new subheap every time one of these larger 
> blocks came along.  The new space from the subheap then went to 
> the top of the freelist, so all the small allocations then filled 
> it up until the next large block allocation.  IE: We never got a 
> chance to reuse freed blocks in older subheaps - at least not 
> very well.  

That's why we have multiple free lists. The code is using the Win95
values now, but there is no reason we couldn't add a few larger values
in the HEAP_freeListSizes array, instead of creating a new mechanism.

> Despite the workaround, we're still not too pleased with the current
> heap allocator.  It's quite slow, and still not as efficient as 
> it could be.  It would probably be worth the effort to integrate
> a new allocator - anyone know if there's a high-quality Wine-license-
> compatible allocator out there?

A new allocator would definitely be a good thing. This one was done
the way it is in order to use a compatible memory layout, but it turns
out this is not necessary so we could scrap it.

-- 
Alexandre Julliard
julliard at winehq.com




More information about the wine-devel mailing list