In Firefox (I guess since Firefox 4) we have the about:memory page. Even if I'm quite familiar with C/C++ dynamic memory management, I have to admit I don't really know how to read that page.
I was hoping about:memory would give me, as JavaScript/front-end developer, a better way to detect/find memory leaks, created in ECMAScript and/or DOM scripting. I'm testing on a Windows 7 and a Mac OS X Snow Leopard system.
So I've got a few questions and hopefully someone can answer those (please don't guess if you are not sure).
- Windows 7 difference between
win32/privatebytesandMemory in use.
This really annoys me. If I'm doing some heavy ECMAScript/DOM operations, the former value seems to increase to no end, where in contrast Memory in use keeps being "smallish".
Which value is really interesting here? It looks like win32 privatebytes is the same value that you can see in your Task Manager.
- What is the difference between
Memory mappedandMemory in use?
I'm googling for quite a while on this one. Some people say it indicates how much of the memory in use is fragmented. What does that mean in detail? Is that a direct indicator for memory leaks?
I'd be happy if someone could explain most of the values just a little (or link a resource which I didn't find). But, most interesting for me is the big gap between those win32 privatebytes and the browsers memory usage. Max OS X does not seem to have an equivalent for those values, which I guess is because of a fundamental different memory management system.