Memory Management

Published August 16, 2005
Advertisement
I waited a couple of days to post as I hadn't done much work on the engine and didn't want to waste server space otherwise.

What have I been working on? As the title states: Memory Management. About a year ago a buddy of mine and I developed our own memory management of sorts. It was based on the Enginuity's algorithm although we didn't like the typicial system of splitting up the reference counting and the smart pointer. We also didn't like how the smart pointer was limited to the base Object type. So we made our own twist where we could use this for anything from integers to custom classes.

It probably has a ton of holes in it, but it's always fun to know you made something that wasn't directly out of a text book! It's also highly likely that it has been done before and people stay away from it for a reason :).

Anyway, I lost the code for it when my laptop hd crashed so I finally got ahold of him and he sent the old code over to me.

After dusting off the file, I made a few optimizations to it and also added a basic garbage collector. I ran various tests against it and it proved memory-leak free (according to crtdbg anyway!).

The code is still a little messy since I haven't implemented a Logger yet and tons of debug messages inhabit it's contents. When I get it cleaned up, I'll post some code examples of it if anyone seems interested.

As for the Logger, I plan to implement something based on this article:

https://www.gamedev.net/reference/programming/features/xmltech/default.asp

It appears to be a very clean solution and I'm pretty psyched to see the results. Talk about sounding like a nerd. Nonetheless, it will be highly benificial.

Regarding the basic structure of the engine: I have decided to stick with my original design of accessing handles although I will most likely take a more polymorphic approach instead. This probably means nothing to you readers, but it will show itself in time.

Thanks for looking!
Previous Entry Plugging away.
0 likes 1 comments

Comments

superpig
Actually, I'm glad to hear that you didn't use the stock memory manager system from Enginuity, because I hate it. The whole IMMObject thing looks OK on the surface, but it doesn't support multiple inheritance or stack objects O_O It'd be OK if you were creating some kind of Java-like based on C++ but that's not what it was supposed to be...
August 16, 2005 03:13 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement