Hi all,
I'd like to add heap memory instrumentation to an msp430x application. At certain points I'd like to know the current heap usage, the maximum heap usage and the total available heap. Additinally, checking for memory corruptions when allocating and freeing memory should also be necessary.
What would be the recommended way to accomplish this? I was thinking about creating wrapper functions to the malloc/free/realloc functions and try adding the checking/accounting there or maybe modify/rebuild the run-time library so that these aspects are done inside the allocation functions themselves. The first approach I think means extra overhead both from speed and memory space perspective. The second one requires a rebuild of the library and I'm not sure that is a good idea.
Thanks and regards,
Alpar