benilla-re systems structs docs

ReserveRaidInstanceInfos

function · ui · primitive

Address
0x4a3370 · 235 bytes, up to 0x4a345a
Signature
void __thiscall (void *this, uint32_t extra, bool round)
Meaning
Grows the saved-instance array's capacity for extra records, rounded by its granularity
Confidence
verified, proof one
Finding
ui/instances#growing-the-saved-list
Test
ui::instances_reserve_saved_list

Finding: Growing the saved list in ui: instance messages

0x4a3370(extra, round) returns when count + extra fits the capacity. Otherwise, with round set, it rounds the need up to a multiple of the granularity +0xc. A granularity of 0 takes the largest power of two not above the need, so the need is rounded up to a power of two, or, for a need of 21 or more, stores 21 as the granularity and uses it. It stores the need as the capacity and calls SMemReAlloc for need × 12 bytes, in 32 bits; when that returns null it allocates anew and, only when the old storage is not null, copies the smaller of the need and the count and frees it. The count is not changed.

The derivation is in the doc.

Callers 1

Callees 3

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