On Tue Nov 7 18:09:52 2023 +0000, Alex Henrie wrote:
Does the call to VirtualAlloc always succeed on Windows Vista and later? If so, I think it would be better to have `ok(ptr, ...)` instead of `if (ptr)`.
It does not.
Above 47 bits, it fails with `ERROR_INVALID_PARAMETER`.
Around 47 bits, it fails with `ERROR_NOT_ENOUGH_MEMORY`, I assume based on whether it was able to find that much contiguous address space.
(The important thing being that none of them kill the program as long as it handles any allocation errors)