Heap profiler's reports vs task manager's reports: who to believe?

余生长醉 提交于 2019-12-10 18:02:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!