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.