benilla-re systems structs docs

CVarTableInitBuckets

function · cvar · primitive

Address
0x63e7b0 · 337 bytes, up to 0x63e900
Signature
void __thiscall (void *this)
Meaning
Sets mask 3 and sizes the bucket vector to four empty buckets
Confidence
verified, proof two
Finding
cvar/containers#growth

Finding: Growth in cvar: containers

The first insertion makes four buckets with mask 3. Before each later insertion the table calls 0x63e9f0 with the bucket index; it returns 1 when it grew. The call lowers the chain counter by 3 (to 0 if it is below 4), adds 1 for each object it walks in that bucket, and grows when an increment takes it past 13 (an empty bucket never grows), unless the mask is already 0x1fff. Growth unlinks every object into a temporary list in bucket order, resizes the vector to twice the buckets, empties all of them with link offset 4, sets the mask to the new count minus one, and links each object at the end of its new bucket.

The derivation is in the doc.

Callers 1

Callees 6

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