CVarTableRehash
function · cvar · primitive
- Address
0x63e9f0· 483 bytes, up to0x63ebd2- Signature
uint32_t __thiscall (void *this, uint32_t bucket)- Meaning
- Adds a bucket's chain length to a counter and doubles the bucket count when an increment takes it past 13
- 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
- CVar::Register cvar
Callees 7
- CVarLinkUnlink cvar
- CVarLinkGet cvar
- CVarLinkNode cvar
- CVarListInit cvar
- CVarBucketChainDrain cvar
- CVarListReset cvar
- CVarBucketsResize cvar
Calls and jumps by a bare address, from tables/calls.tsv.