MCPcopy Create free account
hub / github.com/nodejs/node / print_memory_chunk_list

Function print_memory_chunk_list

deps/v8/tools/windbg.js:542–561  ·  view source on GitHub ↗
(space_type, front, top, age_mark)

Source from the content-addressed store, hash-verified

540const NEVER_EVACUATE = 1 << 7; // see src\heap\spaces.h
541
542function print_memory_chunk_list(space_type, front, top, age_mark) {
543 let alloc_pos = top ? ` (allocating at: ${top})` : "";
544 let age_mark_pos = age_mark ? ` (age_mark at: ${top})` : "";
545 print(`${space_type}${alloc_pos}${age_mark_pos}:`);
546 if (front.isNull) {
547 print("<empty>\n");
548 return;
549 }
550
551 let cur = front;
552 while (!cur.isNull) {
553 let imm = cur.flags_ & NEVER_EVACUATE ? "*" : " ";
554 let addr = hex(cur.address);
555 let area = `${hex(cur.area_start_)} - ${hex(cur.area_end_)}`;
556 let dt = `dt ${addr} ${module_name()}!v8::internal::MemoryChunk`;
557 print(`${imm} ${addr}:\t ${area} (${hex(cur.size_)}) : ${dt}`);
558 cur = cur.list_node_.next_;
559 }
560 print("");
561}
562
563const space_tags =
564 ['old', 'new_to', 'new_from', 'ro', 'map', 'code', 'lo', 'nlo'];

Callers 1

print_memoryFunction · 0.85

Calls 3

module_nameFunction · 0.85
printFunction · 0.70
hexFunction · 0.70

Tested by

no test coverage detected