In my application, I have already redefine malloc and free with keil. Now I hope that the program will be stopped immediately at the exact location at which the program wrote beyond theallocated data. Is there any idea to achieve it?
Thank you for the reply. That is an good idea. However, the comparator of the DWT uint can only monitor up to 32-byte range of addresses by using DWT_MASK Registers. In my application, the Heap size is at least 50K bytes, so it can't meet all aims.
I'd add a virgin pattern before and after each allocated chunk. A heap scan can check these.
DTW is actually more practical for the stack.
View all questions in Cortex-M / M-Profile forum