Heap allocation problem

Duane Clark dclark at akamail.com
Thu Mar 14 19:03:47 CST 2002


Something else to look at when people get back from wineconf.

One of my apps (Actel Designer) was generating the error message from 
HEAP_CreateSystemHeap():
  system heap base address 65430000 not available

This results from the call to MapViewOfFileEx() with the address 
SYSTEM_HEAP_BASE, which is 65430000. The comment in the header of 
MapViewOfFileEx() for this parameter, addr, says it is a "Suggested 
starting address for mapped view".

That then calls anon_mmap_aligned(). In this particular application, the 
address 6543xxxx appears to have already been allocated elsewhere, so 
anon_mmap_aligned() appears to have allocated a valid block, but at a 
different address. Then at the bottom of the routine, the test
   else if (ptr != base)
determines that these two addresses do not match and then unmaps the 
allocated block, leading to the heap allocation failure.

Oddly enough, back in October, when this problem first appeared (with 
the introduction of anon_mmap_aligned()), HEAP_CreateSystemHeap() 
contained the comment "pre-defined address not available, use any one", 
but later on the "use any one" part was removed.

So I tried commenting out the unmapping in anon_mmap_aligned(), and 
returning the allocated pointer, and my program is back to working fine. 
But I am not anywhere near understanding what the right fix is.





More information about the wine-devel mailing list