Fix for programs that store VirtualQueryEx results in signed integers (eg. The Borland Linker)

Alexandre Julliard julliard at winehq.org
Wed Mar 3 18:36:08 CST 2004


Troy Rollo <wine at troy.rollo.name> writes:

> 1. Start with the expected size, and then looping until success, dropping the 
> size by 65536 each iteration.
>
> 2. Start with the expected size, if that doesn't work use a binary search 
> algorithm to see how many we can reserve.

Definitely a binary search.

> None of these is ideal. This might be in the "don't fix it until something's 
> known to be broken" category.

Well, it's currently broken on Solaris, and on some Linux distros
(RHEL3 for instance). The main problem is that we have to prevent the
kernel from allocating things above 0x80000000, but we still need to
be able to put things there ourselves, like Win9x native dlls. This
will require some restructuring of the memory management code.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list