aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/tools/memory/index.html
blob: deef7761469a754b7068ca5ed0fde6b120a48c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: Memória
slug: Tools/Memory
tags:
  - Ferramentas
  - Ferramentas de Programador
  - Firefox
  - Mozilla
translation_of: Tools/Memory
original_slug: Tools/Memoria
---
<div>{{ToolsSidebar}}</div><p>The Memory tool lets you take a snapshot of the current tab's memory <a class="external external-icon" href="http://en.wikipedia.org/wiki/Memory_management#HEAP" title="heap">heap</a>. It then provides a number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.</p>

<p>{{EmbedYouTube("DJLoq5E5ww0")}}</p>

<hr>
<h3 id="O_básico">O básico</h3>

<div class="twocolumns">
<ul>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Opening_the_Memory_tool">Opening the memory tool</a></li>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Taking_a_heap_snapshot">Taking a heap snapshot</a></li>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Comparing_snapshots">Comparing two snapshots</a></li>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Clearing_a_snapshot">Deleting snapshots</a></li>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Saving_and_loading_snapshots">Saving and loading snapshots</a></li>
 <li><a href="/en-US/docs/Tools/Memory/Basic_operations#Recording_call_stacks">Recording call stacks</a></li>
</ul>
</div>

<hr>
<h3 id="Analisar_capturas_de_ecrã">Analisar capturas de ecrã</h3>

<div class="geckoVersionNote">
<p>The Tree map view is new in Firefox 48, and the Dominators view is new in FIrefox 46.</p>
</div>

<p>Once you've taken a snapshot, there are three main views the Memory tool provides:</p>

<ul>
 <li><a href="/en-US/docs/Tools/Memory/Tree_Map_view">the Tree map view</a> shows memory usage as a <a href="https://en.wikipedia.org/wiki/Treemapping">treemap</a>.</li>
 <li><a href="/en-US/docs/Tools/Memory/Aggregate_view">the Aggregate view</a> shows memory usage as a table of allocated types.</li>
 <li><a href="/en-US/docs/Tools/Memory/Dominators_view">the Dominators view</a> shows the "retained size" of objects: that is, the size of objects plus the size of other objects that they keep alive through references.</li>
</ul>

<p>If you've opted to record allocation stacks for the snapshot, the Aggregate and Dominators views can show you exactly where in your code allocations are happening.</p>

<hr>
<h3 id="Conceitos">Conceitos</h3>

<div class="twocolumns">
<ul>
 <li><a href="/en-US/docs/Tools/Memory/Dominators">Dominators</a></li>
</ul>
</div>

<hr>
<h3 id="Páginas_de_exemplo">Páginas de exemplo</h3>

<p>Examples used in the Memory tool documentation.</p>

<div class="twocolumns">
<ul>
 <li><a href="/en-US/docs/Tools/Memory/Monster_example">Monster example</a></li>
 <li><a href="/en-US/docs/Tools/Memory/DOM_allocation_example">DOM allocation example</a></li>
</ul>
</div>