ReallocContextArray
function · core · orchestration
- Address
0x423140· 133 bytes, up to0x4231c4- Meaning
- Sets the context array's capacity exactly, keeping the smaller of capacity and count elements
- Confidence
- verified, proof one
- Finding
- core/scheduler#growable-arrays
Finding: Growable arrays in core: scheduler
Growable arrays are four dwords: capacity, count, storage and quantum. A heap array adds a fifth,
the offset from an element pointer to its heap node. Capacity rounds up to a multiple of the
quantum: 64 for sizes of 64 and above, stored at +0x0c, and below 64 the highest power of two not
above the size, 1 for size 0, not stored. Growth reallocates, falling back to allocate, copy and
free. 0x422720(index, zero) raises the count to index + 1, zeroing the new entries on request;
0x422850(n) sets the count to n and grows only when n exceeds both count and capacity;
0x422b50(add, round) raises the capacity for count + add and leaves the count.
The derivation is in the doc.
Callers 1
- ReleaseSlot core
Callees 3
- SMemAlloc storm
- SMemReAlloc storm
- SMemFree storm
Calls and jumps by a bare address, from tables/calls.tsv.