benilla-re systems structs docs

s_objectPoolBlockCounts

global · objectlayer

Address
0x836728 · 32 bytes, up to 0x836747
Type
uint32_t[8]
Meaning
Holds each type's object pool block count
Confidence
verified, proof one
Finding
objectlayer/classes#class-sizes-and-pools

Finding: Class sizes and pools in objectlayer: classes

Each type's allocation size is its members, its field array and a second per-field array, in bytes base + 4·N; N comes from a small function per type. At startup the manager creates one pool per type 1 to 7 with that size, the class name and a block count. An object comes from its type's pool, which stores the pool handle at +0x10; the active player instead gets a heap block of 26648 bytes.

typeclassbaseNsizeblock
0CGObject_C0x1283308 (no pool)
1CGItem_C0x408351172512
2CGContainer_C0x8c8107267632
3CGUnit_C0x1158170512064
4CGPlayer_C0x25084651134064
5CGGameObject_C0x2f0878464
6CGDynamicObject_C0x1e0349232
7CGCorpse_C0x350687232

The derivation is in the doc.