I think it would be nice if analyze_malloc() could (optionally) store the source code from the line being analysed in its MallocInfo result struct. I've just written a work-around that requires opening and searching through the source files, but analyze_malloc_files has basically already done this, since the source lines are in the .mem files. The option for additional lines of context would be nice too. Maybe something like a keyword argument context, default value 0 (current behaviour), 1 adds the source code line, 2 includes +/-1 line of context, etc.
I think it would be nice if
analyze_malloc()could (optionally) store the source code from the line being analysed in itsMallocInforesult struct. I've just written a work-around that requires opening and searching through the source files, butanalyze_malloc_fileshas basically already done this, since the source lines are in the.memfiles. The option for additional lines of context would be nice too. Maybe something like a keyword argumentcontext, default value0(current behaviour),1adds the source code line,2includes +/-1 line of context, etc.