I tried doing malloc(x) and free(x) recursively till it returns null. x is always incrementing. Global interrupts are disabled before malloc and enable after free. There is no code in between malloc and free.
But every time I tried malloc and free sometimes I get the same address but sometimes different. Am trying this on STMF767ZI (M7).
Aim: Determine the heap size at runtime.
Let me know if you have any simple way to determine heap size at runtime.