This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dynamic memory

hello, (NXP 1768 with RTX)
i will use dynamic memory (heap size : 0x5120=20768) in my project.
project allocate differente size in function of configuration.

i count the size allocate heap use = (size want + 4 byte pointer)

infocenter.arm.com/.../index.jsp

case 1:
at starting, sometimes malloc return null heap use (5246)
in this case want alloc less than case 2
allocate 1 struct1 size z
and allocate 1 struct2 size y (y<z) struct2 is less bytes than struct1.

case2:
but in other configuration can be alloc more than 5246, ex 10 000
allocate 5 x struct1 is ok

in this case 1, i use less byte, but it don't work.

can you explain this?

thanks