Memory Management Books

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Memory Management Books

      I'd love to study the topic of memory management, especially for games of course. It seems like a tricky subject to find information on. Perhaps this is because game memory management isn't as hard a subject as I think it likely is, or maybe there just isn't a market for books solely on the topic...?

      Does anyone have suggestions on a book, chapter, or anything that really dives into understanding how to cache memory and organize it for a memory intensive videogame? The memory classes in this book are great, and I'm getting a lot of insight from them, but I was wondering if they go into more detail anywhere else...

      PS I tried to post this in the books forum, but for some reason I don't have write access to it. So forgive the strange placement of the post.
    • Memory Management: Algorithms and Implementations in C/C++ by Bill Blunden book was my very first intro book that got me interested and wanted to learn more about memory management. This isn't one of the best memory management books out there. In fact it's actually one of the worst and really outdated. But the way he explains it is relatively quite easy to understand that it might be worth your time to read a few chapters for someone who has very little idea about memory management.

      I tried making my own experimental memory manager that overrides the new and delete operators. It didn't do very well until i read David Eberly's 3D Game Engine Design book. There's a section that briefly talks about memory management and applied to the improvement to my engine. It performed about 400% faster than the default new and delete on a single-threaded application.

      The Game Engine Architecture by Jason Gregory also talks about memory management. It talks about different memory allocators. I made some allocator classes based on how i understood it from the book. Feel free to check it out if you're interested.

      MemoryManager.h
      MemoryManager.cpp
      -------
      Allocators.h
      Allocators.cpp

      The Resource Cache part is also a very interesting to read in the GCC book.

      The post was edited 2 times, last by BrentChua ().

    • RE: Memory Management Books

      Memory management is usually something very specific to that game or engine. There are a number of tricks and techniques, but the final solution is always tailored to the final product. The first step is understanding the actual problem you are trying to solve.

      Aside from the various books people have recommended here, you should also check out the Game Programming Gems series. There are a number of really great gems of various kinds of memory managers, from small allocators (like the memory pool I present in Chapter 3) to large allocators. These gems tend to give you a great starting point you can build from.

      -Rez
    • Great advice. Thank you rez, bad_habit, and BrentChua for the advice. I figured the topic was difficult to generalize, or else there would've been more books on the market about it.

      bad_habit, I will definitely look up James Leiterman - sounds interesting.

      Brent, thank you for recommending the Bill Blunden book! I remember seeing that book several years ago but couldn't remember the title! It's already ordered on Amazon.

      rez, the memory handler in Chapter 3 was the reason I actually asked this! I find your implementation of the memory pool to be fascinating, and that's what prompted me to start looking for additional resources on memory management... so thanks for that!