Other Parts Discussed in Thread: SYSBIOS
Why the execution is terminated when allocation fails with the following code? If I've understood correctly, the execution should be returned to the caller in case that error block != NULL.
Error_Block errorBlock;
Error_init(&errorBlock);
pPacket = (Header *) HeapMem_alloc(heap, size , 1, &errorBlock);
if (Error_check(&errorBlock))
{
// this is not fatal for us. we can do here something to recover from the situation.
}
All other parameters are ok, i.e. allocation works fine when there is room in the heap.