Memory Manager and CPUID

I’ve been going through my notes on the engine this week.  There were many little small issues that I was able to mark off the list!  The code is running pretty nice.  Things are certainly headed in the right direction.

Fixed an issue with the Memory Manager when running on a 64-bit processor.  I thought the problem was with some static variables being de-allocated before trying to access them on program exit.  You see, this code is one of the last things to run on program exit in a debug build; that way we can report any memory leaks, etc.  Turns out I spent a lot of time looking in the wrong place for the problem.  The problem ended up being a string that was not initialized with a terminating character.  Lol.  The 32-bit string functions didn’t care, but the 64-bit versions sure did.  Definitely not where I thought I would find the problem.  So happy that this issue can be marked off the list now!

I also made the CPUID class in the system driver compatible with 64-bit.  This code is a lot cleaner now, and the interface is more generic.  I removed the inline x86 ASM code, in favor of the intrinsic __cpuid() and __cpuidex() functions.

About Eric DeBrosse

Lead developer of the Orion Engine.
This entry was posted in Engine Development. Bookmark the permalink.