Hi Marco,
There are several memory usage classes shown in DevTools and Chrome.
Heap profiler always show only memory occupied by live JavaScript objects.
Timeline shows JS heap used by all allocated objects. That includes both live and garbage that is not yet collected. That's why you see the saw graph -- objects are being allocated so the graph goes up and eventually GC kicks in and frees unused objects aka garbage.
When V8 allocates memory for JS heap from the OS it does not do the allocation for each object but rather acquires it in big chunks. So it usually has some extra memory that is committed from the OS but isn't used by any heap objects yet. That's the total heap memory you can see in the Chrome task manager.
If your application's memory usage does not grow so shouldn't do the total heap. It should be within several dozens percents above the peaks of the saw. Do you experience something more than that?
Alexei
--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Alexei,Thanks for your response, it is more clear to me now. I understand that the memory is the Chrome task manager is higher than in the timeline heap. But what 'worries' me is is that the max in the timeline hardly grows on large repeated runs, but the memory on the Chrome task manager keeps hitting higher values.What I did is start my application and repeat an action 20 times. I used this as my baseline (to make sure we did reach all the code, cache were filled etc). What I was expecting is when I did another run of the same action another 100 times, the max in the Chrome task manager would not increase, however this seems to be increasing from 35MB upto an 60MB, while the timeline javascript heap memory graph did not exceed the 19MB. When I did another run of 100 after this, the memory reaches max of even 80MB.WHen I trigger manually the GC by the garbage collect in the timeline, the memory in the task manager is after the first 20 runs 20MB, after 100 additional runs 48MB en after another 100 additional runs 66MB, while the js memory drops to around 4MB. I have attached some screenshots which might make things even more clear.It looks like some memory is getting lost outside the javascript heap, or am I jumping to conclusions ? How would you propose to further investigate this problem ? I am relatively new with the memory tools in Chrome, so any tips are appreciated.
Hi Dai,This is all new territory to me, I never build Chrome from source before, so forgive me any stupid questions. So what I should do is :- get the source code as described in http://dev.chromium.org/developers/how-tos/get-the-code
- build chrome (I am on a Mac OS X 10.8, no problem there ? )
I'll try to setup DMP, and also try to create a more isolated case first, if this fails I will setup and url with an example to the actual webapp. I'll keep you posted on the progress. Any clues on what to focus on, what can leak 'other memory' ?
Or should I just eliminate code to see when the leak disappears ?
Makes sense. I believe many of such leaks will happen commonly in Linux and Mac. Virtualbox should be fine, but it may be very slow.
.....