It's largely arbitrary. The maximum theoretical (2^n) amount of memory it's possible to allocate under Windows is 1 Gbyte, but it didn't seem appropriate to push it right to the limit. When running under Wine, it can't always even manage to allocate the 256 Mbytes.
There's also some positive value in leaving a substantial amount of process memory space not reserved by BB4W, so you can allocate it using the Windows API. If BB4W had grabbed the lot, it would restrict your use of functions like CreateFileMapping (I presume you appreciate that BB4W must 'reserve' all the address space it might ever need at the start; it can't add to the reservation later, because the memory might have become fragmented).
How does the 256 Mbyte limit restrict you, in a way that can't easily be overcome using (for example) the technique described at http://bb4w.wikispaces.com/Allocating+arrays+using+the+Windows+API?
Richard. |
|