CVarBucketsRealloc
function · cvar · primitive
- Address
0x63ee10· 264 bytes, up to0x63ef17- Signature
void __thiscall (void *this, uint32_t capacity)- Meaning
- Reallocates the bucket buffer to a capacity, copying the buckets that fit
- 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 2
- CVarTableInitBuckets cvar
- CVarBucketsResize cvar
Callees 6
- CVarLinkUnlink cvar
- CVarLinkGet cvar
- CVarBucketChainDrain cvar
- SMemAlloc storm
- SMemReAlloc storm
- SMemFree storm
Calls and jumps by a bare address, from tables/calls.tsv.