benilla-re systems structs docs

s_realmSortRecords

global · glue

Address
0xb41f40 · 32 bytes, up to 0xb41f5f
Type
uint32_t[8]
Meaning
Holds four {key, descending} sort records; keys 0 to 3 ascending from 0x46e300, reordered by 0x46e9b0
Confidence
verified, proof one
Finding
glue/realms#sort-records

Finding: Sort records in glue: the realm list

The sort is four records {key, descending} at 0xb41f40, keys 0 characters, 1 load, 2 name, 3 mode. 0x46e300 writes {0,0} {1,0} {2,0} {3,0} once per process, over the zeros of .bss. Only SortRealms changes them, through 0x46e9b0(key): the key already first toggles its direction; any other moves to the front keeping its own, the records ahead of it shifting back one. Then every category is re-sorted and OPEN_REALM_LIST (9) fires. A refresh does not reset the records: the rebuild only reads them, so a sort lasts until the process exits. SortRealms(s) maps name, load, characters and mode case-insensitively, any other string or number to name; anything else raises Usgae: SortRealms("type"), the binary's spelling.

The derivation is in the doc.