VirtualAlloc bug ?
Eric Pouech
eric.pouech at wanadoo.fr
Wed Apr 3 20:19:44 CST 2002
> I tried to use VirtualAlloc with MEM_COMMIT to map a page at address
> 0x7ffe0000. The call to VirtualAlloc failed with ERROR_INVALID_ADDRESS. I
> then tried to reserve the pages first, using VirtualAlloc with MEM_RESERVE,
> and the call to VirtualAlloc/MEM_COMMIT worked fined after that.
>
> The MSDN state that "(MEM_COMMIT) If a memory page is not yet reserved,
> setting this value causes the function to both reserve and commit the memory
> page.".
this has changed recently. my local information (2K, 95 and NT 3/4 help,
and
not XP as on line) doesn't state this
most (old) MSDN code about VirtualAlloc use the form
ptr = VirtualAlloc(<addr>, <size>, MEM_RESERVE|MEM_COMMIT,
PAGE_READWRITE);
and not the only MEM_COMMIT
we should investigate a bit more this point for the VirtualAlloc
implementation
as of today, use the MEM_RESERVE|MEM_COMMIT form, it'll be just fine
A+
More information about the wine-devel
mailing list