Sorry for the delay with my answer, I'm trying to catch up with this problem.
First, and about the patch Eli has offered for mmap_realloc(), I would be interested in knowing
what was the error code at line 718:
DebPrint (("realloc enlarge: VirtualAlloc error %ld\n",
GetLastError ()));
I wonder if there is a case where it would fail on the VirtualAlloc() and manage with the mmap_alloc() later.
I agree than in the case of a failure with VirtualAlloc(), we don't return NULL here, which may be the root
of further problems.
Second, I don't see the problem in mmap_alloc(): if VirtualAlloc() fails, p is NULL and this is the value returned
at line 668:
Am I missing something here ?
Fabrice