CTL Memory allocation : ctl_memory_area_allocate behaviour
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
http://www.rowleydownload.co.uk/arm/packages/libraries/libctl/html/index.htm?http://www.rowleydownload.co.uk/arm/packages/libraries/libctl/html/ctl_memory_areas.htm
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[8];
sizeof(struct test) = 24 byte
total size of mem = 192 byte
-- First node allocation happens at same address as that of mem[0].
-- Second node allocation happens at the offset of 672 bytes.
Please clarify if the above behavior is normal.
Best regards
Hemraj
Please sign in to leave a comment.
Comments
0 comments