Q HeapAlloc.

Oliver Stieber oliver_stieber at yahoo.co.uk
Sat Jan 15 14:50:10 CST 2005

I been having a problem where HeapAlloc is failing
even though there's plenty of virtual memory left

I've done a bit of digging but haven't been able to
get to the bottom of it.

First of all I've checked that HeapAlloc will go into
swap by allocating a lot of 64meg blocks and writing
to them  to force linux to allocate them properly, and
it works fine.

Then I changed alloc.c so that CreateSubHeap writes
the status returned by NtAllocateVirtualMemory and I
HEAP_CreateSubHeap Could not allocate 00410000 bytes
reason: C00017 [STATUS_NO_MEMORY]

an I double checked this by putting a malloc in just
after the failure, which failed.

So then I wrote a a small non-wine test program run as
a seperate process to allocate ten times as much ram
and ran it while just after the crash (while the debug
box was still up) and it works fine.

Any ideas?

Top says

514916k total,
388032k used,
126884k free,
4244k buffers

401584k total,
251488k used,
150096k free,
62916k cached

Virt  : 2279m 
RES   : 150m 
Shared: 807m   
Mem   : 30.0%  

ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

More information about the wine-devel mailing list