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
On October - 6 - 2009
Add A Comment
You must be logged in to post a comment.