resonance 1.0.1
Loading...
Searching...
No Matches
HeapNode Struct Reference

One node of a heap, which is the boundary tag in front of a block. More...

#include <heap.h>

Collaboration diagram for HeapNode:

Public Attributes

uintptr_t mPrevAndFree
HeapNode * mNext
HeapNode * mFreePrev
HeapNode * mFreeNext

Detailed Description

One node of a heap, which is the boundary tag in front of a block.

Nodes form one doubly linked run in address order through mPrevAndFree and mNext, and the free nodes additionally form one unordered list through mFreePrev and mFreeNext. An allocated node uses only the first two words, so its payload starts at kHeapNodePrologueSize and overlaps the two free-list words. A free node uses all four.

The run ends at a tail node whose mNext is null and which is never allocated from. The stats line calls these records nodes, the source of the name.

Member Data Documentation

◆ mPrevAndFree

uintptr_t HeapNode::mPrevAndFree

Preceding node, bit 0 set while free. +0x00

◆ mNext

HeapNode* HeapNode::mNext

The following node in address order, null at the tail. +0x04

◆ mFreePrev

HeapNode* HeapNode::mFreePrev

The previous free node, valid only while free. +0x08

◆ mFreeNext

HeapNode* HeapNode::mFreeNext

The next free node, valid only while free. +0x0c


The documentation for this struct was generated from the following file: