Troy Rollo wine@troy.rollo.name writes:
- Start with the expected size, and then looping until success, dropping the
size by 65536 each iteration.
- 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.