On Mon, Jan 08, 2001 at 09:58:25PM -0800, Ken Coleman wrote:
> Hi all,
> 
> I've been messing around trying to get Age of Empires II working, and
> I've come across what I believe is a bug in the Wine implementation of
> VirtualFree().  I searched the website, but this issue doesn't seem to
> have come up before.
> 
> The problem appears to be using the VirtualFree() function with the
> MEM_DECOMMIT flag on a section of memory that hasn't been allocated by
> VirtualAlloc().  I have no idea why AOE2 is doing this (it may be
> related to another bug or something), but it's definitely legal under
> Windows.  In particular, I tried this under NT4:
> 
> BOOL result = VirtualFree((LPVOID)0x5192fc71, 0x3fe7, MEM_DECOMMIT);

[snip test]

> Anyways, I'm curious to know if this is a known issue, and what we can
> do about it.  I'm not about to start mucking around inside an
> important function like VirtualFree() without some confirmation that
> is an actual bug.  :) I am very willing to aid in any way, though,
> once its bug-status has been confirmed.
Yes, I'd say that both VirtualAlloc() and VirtualFree() have some weird
issues. Some programs call them with "weird" flag combinations that are
not illegal (I'm not saying legal !) on Windows.
And we don't really have a solution yet how to handle these specific flag
combinations. We should investigate that.
And if you think you know how to fix it, then I'd say: go ahead !
(after some testing on Windows and with many other programs to test
compatibility)

In short: I'm not too proficient with virtual memory handling issues,
so the only thing I can tell you is:
problems with these functions are a known issue and it should
be fixed somehow.

Andreas Mohr

Reply via email to