Memory Managers

Started by
4 comments, last by Icefox 19 years ago
I'm starting a RTS Game Engine, but i don't know how to make the memory manager, i check the enginuity aproach, but then i read that the autor says "i won't use that memory manager".. so, which classes or desing i need to make a good memory manager.?? Thanks in advance. and sorry for my english
------------------------------------ IDLoco Game Studios
Advertisement
idloco,

Check out the MMGR from Paul Nettle at www.fluidstudios.com It works pretty well, and very simple to use.

-brad
-brad
if your just starting your engine then i would recommend you workout the design of your class hierarchy first (filereader/-writer, geometry-/texture manager, renderer,..). Best time for writing your own memory manager would be when it comes to optimization (the last thing on your todo-list).

But still writing a good mem-manager is a pain. I am using shared pointers and signals (event management) from the boost library which i would recommend to anyone.

check out:
www.boost.org

cheers.
any examples of a class hierarchy or something to guide me a little ?
Thanks for the input

[Edited by - idloco on March 30, 2005 1:06:10 PM]
------------------------------------ IDLoco Game Studios
I wrote a 2-series tutorial on using custom memory manager that will look and work like a pool when you allocate/deallocate custom objects.
You can get it (and read the tutorials if you want) from my website @ http://openglgui.sourceforge.net
I read a fairly recent paper that basically claimed that in most cases, writing your own mem manager was a waste of time... I can dig up a reference if you want. The Linux memory manager is pretty fast, and I've heard good things about boost as well, so even if you need something custom, look around for libraries other people have written first.

Regardless, as has been said, writing a memory manager should be the last thing on your mind. Write your game, profile it, and if memory allocation is really that much of a bottleneck, THEN worry about it.
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192

This topic is closed to new replies.

Advertisement