Thursday, March 18, 2010

J1N Games

Jason Kim's Personal Journey Into Game Development

C++ Memory Manager

Posted by Jason On October - 6 - 2009

This is a C++ example of our own versions of Malloc and Free.  In Embedded Systems, often memory is not readily available and small.  Thus static allocations of memory are often good.
This Memory Manager works with a static allocation of a memory pool.  This way the user knows exactly how much memory they are working with, as opposed to dynamic memory in heaps.
We have a memory pool of something like char[10000] where our malloc returns a pointer in memory in the pool and allocates bytes from the pool, and our free frees up the pointer memory.

C++ Memory Manager

Add A Comment

You must be logged in to post a comment.