Live data from Hacker News

Salt Lake 2002 – not enough memory/crashes to desktop after starting error

vogons.org

11–20 of 32 posts

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#12
post #8

I'm intrigued why MS decided to have GlobalMemoryStatus return a negative number if there is more than 4GB, rather than returning the maximum value.

I think it's worse than that. It returns the max value (2GB) when there is more than 2GB but less than 4GB, but a negative value if there is more than 4GB.

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#14
If I was more skilled with a debugger, I'd try to dig into why one of my favorite childhood games (an arcade WWII dogfighter game) runs just fine on Windows for ARM64, EXCEPT resetting inventory between each level, which makes final bosses much less fun, as part of the game is stacking powerups.

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#15
post #8

I'm intrigued why MS decided to have GlobalMemoryStatus return a negative number if there is more than 4GB, rather than returning the maximum value.

2^32 is 4294967296, or 4 GiB. Back before Windows ran on 64-bit machines, 4 GiB was as big a number as a standard int could represent. Updating it for 64-bit mode would mean breaking 32-bit programs, so "fixing" it isn't necessarily an upgrade.

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#16
post #15
post #8

I'm intrigued why MS decided to have GlobalMemoryStatus return a negative number if there is more than 4GB, rather than returning the maximum value.

2^32 is 4294967296, or 4 GiB. Back before Windows ran on 64-bit machines, 4 GiB was as big a number as a standard int could represent. Updating it for 64-bit mode would mean breaking 32-bit programs, so "fixing" it isn't necessarily an upgrade.

I think OP was suggesting that instead of overflowing, the API could have instead returned 2^32 / 4 GiB.

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#18
post #7
post #5

Earlier quoted context omitted.

Just don't read their poetry.

Honestly the Vogons were only the third worst poets in the universe. If you can read awful human poetry like anything by Paula Nancy Millstone Jennings, they won't faze you.

I tried once, but I had to gnaw my own legs off to survive.

Re: Salt Lake 2002 – not enough memory/crashes to desktop after starting error

#20
post #17

This is why “warning. Game needs 64 mb and you have -2gb continue y/n?” Is better than just dying out.

I think it depends on application. For a video game, that’s what you should do. However, that’s not really advisable for a database where broken invariants might lead to corruption.
Post reply on HN