In 32bit mode application has access to 2GB of virtual address space. How would you find out the maximum size of memory you can allocate to this virtual address space, without malloc or new failing?
For example, lets say you want to take up the whole 2GB of virtual address space, but you just allocated 2MB of data in the middle of the 2GB address space. Is there a Windows API call that you can find out the max concurrent address space that you can allocate? So that when you call malloc or new the call does not fail?
Thank you for your time.
Source:
http://www.voyce.com/index.php/2009/08/21/largest-free-block-of-address-space/