Why _List has so many instances?

54 views
Skip to first unread message

Kun Zhao

unread,
Apr 20, 2016, 12:41:00 PM4/20/16
to Dart VM Observatory Discuss
I have graph designer like web application. When it loads a big project, the memory usage can go up to 2GB. I am trying to find out if I have memory leak. The first thing I did is open the App, w/o loading any project and observe the Allocation Profile.

My app shows memory usage of 128MB in task manager:


Here is the Allocation Profile:






Notice that without loading anything, there are already so many _List. Then I clicked on the _List to show the details as following:



Appending _List(100), it looks like this list recursively references to the whole list:





When a big project is loaded, the _List new generation accumulate size can go up to 1.5G. It is very suspicious to me.
 
Why _List(100) reference recursively? How can I find out if there is a memory leak?

Thanks.


Kun Zhao

unread,
Apr 20, 2016, 1:19:43 PM4/20/16
to Dart VM Observatory Discuss
An update, click GC button can get rid of a lot of _list instances:

There is the number when the web page just loaded (w/o loading any project):


This is after forced a GC:


Here are the numbers: 1. after loading a big project  2. forced GC

John Mccutchan

unread,
Apr 21, 2016, 10:10:19 AM4/21/16
to Kun Zhao, Dart VM Observatory Discuss
Lists are allocated internally by the VM for many things. For example, every time you request an allocation profile ~4 lists are allocated.

John

--
You received this message because you are subscribed to the Google Groups "Dart VM Observatory Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.

Kun Zhao

unread,
Apr 22, 2016, 9:42:17 AM4/22/16
to Dart VM Observatory Discuss, kunz...@gmail.com
johnmccutchan,

Thanks for your response. Could you give some general suggestion about how to find potential memory leak?

Thanks,
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-discuss+unsub...@dartlang.org.

John Mccutchan

unread,
Apr 22, 2016, 10:06:06 AM4/22/16
to Kun Zhao, Dart VM Observatory Discuss, rma...@google.com
+Ryan Macnak 

Ryan can help you with diagnosing memory leaks in Observatory.

Thanks,
John

To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.

--
You received this message because you are subscribed to the Google Groups "Dart VM Observatory Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.
Reply all
Reply to author
Forward
0 new messages