This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FIFO using malloc

Hi,

I have to store variable length data in a FIFO.
The main program puches and pops lots of data on/from that FIFO. Data is only pushed
when there is space in in the FIFO-buffer.

Is it a good idea to use dynamic memory allocation (malloc, free) or will I have problems with a growing heap full wasted unusable memory gaps?

Would it be better to store the FIFO in a fixed array and manage the memory for the FIFO-buffer myself?

Suggestions are very welcome.

Kind regards

Luc Vercruysse

0