benilla-re systems structs docs

ResizeBuckets784ca0

function · ui · primitive

Address
0x784ca0 · 317 bytes, up to 0x784ddc
Signature
void __thiscall (void *this, uint32_t count)
Meaning
Sets a bucket array's count, rounding the capacity to its quantum below 21 and freeing dropped nodes
Confidence
verified, proof one
Finding
ui/containers#font-table

Finding: Font table in ui: list, table and array helpers

The font registry is a hash table at 0xcf4e80: main list +0x4, bucket array +0x14, mask +0x24. The font-by-name lookup 0x783870 calls 0x784810 while the mask is still −1: it sets the mask to 3 and the bucket array to 4 twelve-byte heads, empties every head's list and marks each head with 4. 0x784ca0(n) sets the bucket count to n by the template's rule (quantum 21 above 20 buckets, else the largest power of two not above the count) and, for a smaller count, unlinks and frees the dropped buckets' nodes. 0x784310(list, extra, flags) allocates extra + 0x1c bytes, constructs a record in it with 0x783520 and links it at the head of the list.

The derivation is in the doc.

Callers 1

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.