Skip to content

Commit 29cf623

Browse files
authored
doc: add getHeapStatistics() property descriptions
PR-URL: #54584 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 99b491c commit 29cf623

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

doc/api/v8.md

+29
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,35 @@ Returns an object with the following properties:
198198
* `used_global_handles_size` {number}
199199
* `external_memory` {number}
200200

201+
`total_heap_size` The value of total\_heap\_size is the number of bytes V8 has
202+
allocated for the heap. This can grow if used\_heap needs more memory.
203+
204+
`total_heap_size_executable` The value of total\_heap\_size\_executable is the
205+
portion of the heap that can contain executable code, in bytes. This includes
206+
memory used by JIT-compiled code and any memory that must be kept executable.
207+
208+
`total_physical_size` The value of total\_physical\_size is the actual physical memory
209+
used by the V8 heap, in bytes. This is the amount of memory that is committed
210+
(or in use) rather than reserved.
211+
212+
`total_available_size` The value of total\_available\_size is the number of
213+
bytes of memory available to the V8 heap. This value represents how much
214+
more memory V8 can use before it exceeds the heap limit.
215+
216+
`used_heap_size` The value of used\_heap\_size is number of bytes currently
217+
being used by V8’s JavaScript objects. This is the actual memory in use and
218+
does not include memory that has been allocated but not yet used.
219+
220+
`heap_size_limit` The value of heap\_size\_limit is the maximum size of the V8
221+
heap, in bytes (either the default limit, determined by system resources, or
222+
the value passed to the `--max_old_space_size` option).
223+
224+
`malloced_memory` The value of malloced\_memory is the number of bytes allocated
225+
through `malloc` by V8.
226+
227+
`peak_malloced_memory` The value of peak\_malloced\_memory is the peak number of
228+
bytes allocated through `malloc` by V8 during the lifetime of the process.
229+
201230
`does_zap_garbage` is a 0/1 boolean, which signifies whether the
202231
`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
203232
garbage with a bit pattern. The RSS footprint (resident set size) gets bigger

0 commit comments

Comments
 (0)