When would the python tracemalloc module allocations statistics not match what's shown in ps or pmap?
问题 I'm trying to track down a memory leak, so I've done import tracemalloc tracemalloc.start() <function call> # copy pasted this from documentation snapshot = tracemalloc.take_snapshot() top_stats = snapshot.statistics('lineno') print("[ Top 10 ]") for stat in top_stats[:10]: print(stat) This shows no major allocations, all memory allocations are pretty small, while I'm seeing 8+ GB memory allocated in ps and pmap (checking before and after running the command, and after running garbage