1# Memory Tools 2 3The Memory tool lets you take a snapshot of the current tab's memory 4[heap](https://en.wikipedia.org/wiki/Memory_management#HEAP). 5It then provides a number of views of the heap that can 6show you which objects account for memory usage and exactly where in 7your code you are allocating memory. 8 9<iframe width="595" height="325" src="https://www.youtube.com/embed/DJLoq5E5ww0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"></iframe> 10 11------------------------------------------------------------------------ 12 13### The basics 14- Opening [the memory 15 tool](basic_operations.html#opening-the-memory-tool) 16- [Taking a heap 17 snapshot](basic_operations.html#saving-and-loading-snapshots) 18- [Comparing two 19 snapshots](basic_operations.html#comparing-snapshots) 20- [Deleting 21 snapshots](basic_operations.html#clearing-a-snapshot) 22- [Saving and loading 23 snapshots](basic_operations.html#saving-and-loading-snapshots) 24- [Recording call 25 stacks](basic_operations.html#recording-call-stacks) 26 27------------------------------------------------------------------------ 28 29### Analyzing snapshots 30 31The Tree map view is new in Firefox 48, and the Dominators view is new 32in Firefox 46. 33 34Once you've taken a snapshot, there are three main views the Memory 35tool provides: 36 37- [the Tree map view](tree_map_view.md) shows 38 memory usage as a 39 [treemap](https://en.wikipedia.org/wiki/Treemapping). 40- [the Aggregate view](aggregate_view.md) shows 41 memory usage as a table of allocated types. 42- [the Dominators view](dominators_view.md) 43 shows the "retained size" of objects: that is, the size of objects 44 plus the size of other objects that they keep alive through 45 references. 46 47If you've opted to record allocation stacks for the snapshot, the 48Aggregate and Dominators views can show you exactly where in your code 49allocations are happening. 50 51------------------------------------------------------------------------ 52 53### Concepts 54 55- What are [Dominators](dominators.md)? 56 57------------------------------------------------------------------------ 58 59### Example pages 60 61Examples used in the Memory tool documentation. 62 63- The [Monster example](monster_example.md) 64- The [DOM allocation example](DOM_allocation_example.md) 65