We are using ctl_memory_area_allocate() to manage the memory allocations instead of malloc. We have referred the below link for the example,
Referred below link
It appears to work fine but I have one question about the behavior of ctl_memory_area_allocate().
"It is not allocating the subsequent memory allocations in the contiguous space even when the memory is available. It is actually creating gaps in between which may create other problems"
example : struct test mem;
sizeof(struct test) = 24 byte
total size of mem = 192 byte
-- First node allocation happens at same address as that of mem.
-- Second node allocation happens at the offset of 672 bytes.
Please clarify if the above behavior is normal.
Please sign in to leave a comment.