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

heap monitoring

The software I am working on is written in c++ and uses the RTX RTOS. The program creates instances of module classes according to a configuration string. These are deleted and then remade if this string is altered.

After a few iterations the program hangs during a call to new which I am assuming is because it ran out of heap space. What I would like to do is monitor the amount of heap available and check that modules free all the memory they are allocated when they are deleted.

Could anyone offer some advice on detecting memory leaks or a method of monitoring the heap usuage?

Many Thanks

Parents
  • not a big expert (yet) when it comes to ARM / MCBSTR, but maybe you have the source code of your memory manager? I guess your 'new' function is overloaded so that it gets the chuncks of memory that are required from a pool that is allocated during start-up. if you have access to the source, you can monitor everything you want. I am not sure there is another way that is relialbe (i.e. answering the question: "hmmm, the memory pointed by this pointer was allocated on the stack or the hear?")

Reply
  • not a big expert (yet) when it comes to ARM / MCBSTR, but maybe you have the source code of your memory manager? I guess your 'new' function is overloaded so that it gets the chuncks of memory that are required from a pool that is allocated during start-up. if you have access to the source, you can monitor everything you want. I am not sure there is another way that is relialbe (i.e. answering the question: "hmmm, the memory pointed by this pointer was allocated on the stack or the hear?")

Children
No data