Hello,
I'm using the ARM-MDK with RealView RTL in the version 3.03a. I want to allocated variable memory blocks, so I don't want to use the memory allocation macros from RTL and I want to use the malloc() and free() functions from the RealView ARM C Libary. According to the documentation of this libary those 2 functions are threadsafe. But in the RealView RTL documentation it's mentioned that I shouldn't use malloc() or free() without using tsk_lock() and tsk_unlock().
So my question, which statement is correct?
Hi Rainer,
I think that the malloc and free function are thrade-safe only respect to use of heap memory; for example, they aren't protect respect to task switching of operative systems, so you have to use tsk_lock and tsk_unlock.
Kinds Regards,
Giovanni.