Remix.run Logo
▲ hyperhello 4 hours ago

I don’t know much about CPU and memory back then, but did they not have some kind of memory access debugging mode where it would match every access against the alloc map, understanding that it could be very slow, but would find some of this kind of bug? Come to think of it, do we even have that today?

▲bboreham 3 hours ago | parent | next [-]

There was such a tool, called Purify.

https://web.stanford.edu/class/cs343/resources/purify.pdf

▲vjvjvjvjghv 2 hours ago | parent [-]

Purify was great until Rational bought it and jacked up the price 10x.

▲jeffbee 4 hours ago | parent | prev [-]

This is what sanitizers do.

▲hyperhello 4 hours ago | parent [-]

I know compilers have advanced, but I was wondering about a runtime debug check.

▲chuckadams 4 hours ago | parent [-]

A sanitizer is that runtime debug check. The compiler just inserts those checks.

▲hyperhello 4 hours ago | parent [-]

Okay. Then I have to assume that they didn't do it for SimCity! Thanks.

▲chuckadams 4 hours ago | parent [-]

Sanitizers come with a lot of overhead, and the tech wasn't readily available in SimCity's day, certainly not for Windows 95.

▲hyperhello 4 hours ago | parent [-]

I was imagining more like some kind of primitive CPU mode that sends every single RAM request to a software exception. Something you would normally have turned off but available for truly heavy duty debugging.

▲chuckadams 3 hours ago | parent | next [-]

That sounds pretty similar to what Valgrind does, basically runs your program in a VM with that kind of instrumentation. The details of how it works are way past the boundaries of my own knowledge though :)

▲jeffbee 6 minutes ago | parent | prev | next [-]

The operating system could effect this by not providing any page tables to the CPU, so every memory reference faults and the OS has to handle them all.

▲ 3 hours ago | parent | prev [-]
[deleted]