benilla-re systems structs docs

s_cvarTable

global · cvar

Address
0xc4ed94 · 40 bytes, up to 0xc4edbb
Type
uint32_t[10]
Meaning
Holds the CVar table object: vtable, list, chain counter, bucket vector and mask
Confidence
verified, proof two
Finding
cvar/containers#hash-table-object

Finding: Hash table object in cvar: containers

A table object is +0 the vtable, +4 the link offset of the all-records list, +8 and +0xc its terminator, +0x10 a chain counter, +0x14 the bucket vector (capacity, count, data, granularity) and +0x24 the mask, −1 while there are no buckets. A bucket is 12 bytes: the link offset (4 once set, 0xdddddddd before), then a terminator. A record holds its hash at +0, its bucket link at +4 and its list link at +0xc. The index of a name is SStrHashHT(name) & mask; a lookup walks the bucket from its first object and accepts the first whose stored hash is equal and whose name matches SStrCmpI.

The derivation is in the doc.