Russell Johnson via Xenomai <[email protected]> writes:
> Am I correct in assuming that any dynamic allocation in an EVL thread needs > to use the EVL heap in order to avoid in-band context switching? > > > > There are 4 calls in particular that I am using from the EVL heap API: > evl_init_heap (on startup), evl_alloc_block (may be called during realtime > processing to expand a data structure), evl_free_block (on shutdown), > evl_destroy_heap (on shutdown). The question is are all 4 of these calls > expected to only ever be called by an EVL thread? Looking at the source > code, I see that the alloc and free functions lock/unlock an EVL mutex so I > assume those can only be called from an EVL thread? Though the error codes > are not checked on those mutex calls, so if you call alloc or free from a > Linux thread, they do not fail. Can init and destroy be called from a Linux > thread? I was looking at the test code in libevl for heap-torture, and it > appeared that all 4 of these functions were being called from an EVL > attached thread. > Please check this documentation, the 3rd column gives the answer: https://evlproject.org/core/user-api/function_index/#memory-heap-services -- Philippe.
