One approach to this feature would have been to create some callbacks to update the memory stats, called by malloc/realloc/free functions. This approach would have been questionable because processing has to be done each time somememory functions were called.
The current approach is to export some memory api functions (something similar to q_sums) which will itereate through the memory fragments and agregate their size. The kamcmd callback will call those functions and print the agregated results.

Reply to this email directly or view it on GitHub.