benilla-re systems structs docs

FreeBuckets4c5fe0

function · ui · primitive

Address
0x4c5fe0 · 135 bytes, up to 0x4c6066
Meaning
Empties a table's bucket lists and frees the bucket array
Confidence
verified, proof one
Finding
ui/containers#hash-tables

Finding: Hash tables in ui: list, table and array helpers

123 rows are the functions of the hash table template: the bucket array is a vector of 12-byte list heads, the main list threads every node, and the mask is the bucket count less one:

FunctionRowsDoes
EmptyTable19Empties the table, frees its buckets and sets the mask to -1
ReallocBuckets18Reallocates a bucket array, moving each bucket list
DestroyTable17Destroys a table: empties it, frees its buckets and frees it when bit 0 of the argument is set
FreeBuckets17Empties a table's bucket lists and frees the bucket array
ResizeBuckets14Sets a bucket array's count, rounding the capacity to its quantum below 21 elements
GrowBuckets10Grows a bucket array by a count, rounding the capacity to its quantum
GrowOnLongChain8Doubles a table's buckets and rehashes when the run counter passes 13 on a chain walk, below mask 0x1fff
RehashTable7Moves a hash table's nodes into a resized bucket array
ClearTable7Unlinks every node of a table and, unless its argument is set, frees each
InitTable4Builds an empty hash table with mask -1
ShouldGrow2Adds a bucket's chain walk to the run counter and grows the table when it passes 13

The derivation is in the doc.

Callers 1

Callees 3

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