问题
I have a Chrome extension that appears to have a memory leak: Chrome's task manager reports a gradually increasing memory footprint. But when I use the dev tools profiler to take heap snapshots and compare them, I see net negative size deltas. So, why don't these two tools agree?
Is Task Manager measuring something in addition to or different from heap? I see mentions of "javascript heap" vs "native memory" -- how do these affect what these tools report? And what is meant by native memory in this context?
This is basically the same question as in Interpretation of memory usage in chrome task manager and Chrome Heap Snapshot - Why it doesn't show all the memory allocated?, but neither of these got a conclusive answer. So I'm hoping the third try is a charm, and someone can lay it all out.
Additional information: OK, I see you can add more columns to Task Manager, including "javascript memory." (Also: "goats teleported.") Presumably that column should correlate pretty closely with what I see in the Heap Profiler. And indeed it climbs up a little and then goes down, and is generally acting reassuringly non-leaky. So what is the Task Manager memory column? The javascript and the DOM and the HTML and the CSS and ... what else?
来源:https://stackoverflow.com/questions/25944046/heap-profilers-reports-vs-task-managers-reports-who-to-believe