I am studying FreeRTOS, and in their tutorial book they talk about using "a pool of pre-allocated buffers" for holding pointers to char[]
arrays (to pass between tasks via a queue).
In the example found in Chapter 4.5 Working with Large or Variable Sized Data, they reference this sudo function called prvGetBuffer()
and state "The implementation of prvGetBuffer() is not shown – it might obtain the buffer from a pool of pre-allocated buffers, or just allocate the buffer dynamically.". This seems like a funciton I would like to take a look at, but its nowhere to be found in their docs / examples.
What exactly is "a pool of pre-allocated buffers", and what does an implementation look like in C/C++
? I can't find much on the internets about this.
I want to assume it is perhaps a 2-dimensional array that is "statically" allocated prior to run-time. Maybe it gets declared like char strBuffer[5][50];
or something - idk.