LPVOID pHighest = ::VirtualAlloc( 0, 1, MEM_TOP_DOWN|MEM_RESERVE, PAGE_READWRITE );
::VirtualFree( pHighest );
pHighestnow contains the highest address the Operating System will let you have. If it's a value over
0x7FFFFFFFthen the /3GB flag is enabled (or your software is running on a 64-bit OS). In any case, you now have the power to make decisions about how much address space to use or if you're using too much.
Of course, all of this becomes moot when we start writing software exclusively for 64-bit OSes.
I can't wait.
#1 I have to implement the 3bit flag in xp.
#2 I'm waiting for my 64 bit of xp to arrive for vista.
Get out of my HEAD!
Post a Comment