• Advertisement
Sign in to follow this  

Memory Managers

This topic is 4768 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
idloco,

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

-brad

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement