upvote
Console games of that era don't usually malloc; they have globals. Entities go into pools / buffers that are allocated ahead of time
reply
It needs to be a global variable in C. A variable in a function scope or runtime malloc'd spot? No chance of finding a stable spot.

Thankfully, a lot of old games love to use global variables because you can't run out of stack space or allocatable memory. Modern games shy away from that because even the tiniest consoles these days come with gigabytes worth of RAM, even a memory leak has to be a gigantic firehose to bring the system to a halt.

reply
> A variable in a function scope or runtime malloc'd spot? No chance of finding a stable spot.

It depends, on a system with no ASLR it's potentially still deterministic, but there are a lot of potential sources of non-determinism.

reply