The semaphore system on POSIX and FreeRTOS handles buffers differently.
A call to csp_bin_sem_create on FreeRTOS calls pvPortMalloc (through a
QueueCreate call). The resulting handle is therefore a direct link to the
malloc'ed area and this MUST be free'd again.
A call to csp_bin_sem_create on POSIX calls sem_init which works directly on
the type given as argument, so in this case the semaphore variable is stored in
the user storage and not allocated on the HEAP. Therefore this semaphore MUST
NOT be free'd!
This is inconsistent and results in a memory leak if binary semaphores are used
on FreeRTOS!
Original issue reported on code.google.com by johan.de...@gmail.com on 25 Jun 2010 at 7:25
Original issue reported on code.google.com by
johan.de...@gmail.com
on 25 Jun 2010 at 7:25