Skip to main content

memlab analyze unbound-object

Check unbound object growth (a single object with growing retained size)

memlab analyze unbound-object 

Example output​

$ memlab analyze unbound-object --snapshot-dir /tmp/memlab-example/series/data/cur
Top growing objects in sizes:
 (Use `memlab trace --node-id=@ID` to get trace)

· Window [JSGlobalObject] / http://localhost:3000 [object](@40065):  45.9KB > 49.4KB > 49.4KB > 49.4KB > 49.4KB > 49.4KB > 49.4KB > 49.4KB > 49.4KB

How to read the output​

memlab analyze unbound-object compares a series of snapshots of the same page and lists the objects whose retained size keeps growing.

Each line is the object and its id, then its retained size in each snapshot in order. In this example, the global object grows once, between the first and the second snapshot, and then stays flat. That is one-time setup, not a leak. A leak keeps growing with every repetition of the same action.

Options​

  • --snapshot-dir: set directory path containing all heap snapshots under analysis

The universal options (--help, --verbose, ...) work with this command too.