Sheer luck: the first call to VirtualAlloc succeeds because it asks for an amount that is much smaller than the 64-bit address space.