A FIFO Queue that stores bytes in a static allocated memory pool. Embedded Systems often have a small amount of memory to work with. So often times people use a static allocation of memory so they know exactly how much memory they are working with as opposed to dynamic memory on a heap. This program is an example of how to construct a queue with a static allocation of memory and store values by byte in the memory pool.
The basic idea is you have something like char pool[10000] and pool becomes your static allocation of memory. Then you can store unsigned char bytes into the char array as a queue, popping off bytes as you need etc.
C++ Memory Queue
On October - 6 - 2009
Add A Comment
You must be logged in to post a comment.