luaM_reallocPool
function · lua · primitive
- Address
0x6fae90· 842 bytes, up to0x6fb1d9- Signature
void * __fastcall (lua_State *L, void *block, uint32_t size)- Meaning
- Allocates, moves or frees a block in six fixed-size pools up to 256 bytes, else in Storm's heap
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- lua/pools#allocating-from-the-pools
- Test
lua::realloc_pool_whole
Finding: Allocating from the pools in lua: block pools
luaM_reallocPool(L, block, size) with no state is SMemReAlloc. Size 0 frees, returning null: a
block of a chunk to the head of its free list, another to SMemFree. A null block takes one of the
first pool that holds the size, else SMemAlloc; a heap block is SMemReAlloced. A pool block its pool holds stays; a larger size takes a block of the first
later pool that holds it, else SMemAlloc, copies the old pool's block size and frees the old. A pool gives the head of its first chunk with a free block, else grows its
chunk array by one and cuts a chunk of 0x20000 / size blocks in address order. Only closing the
state frees chunks.
The derivation is in the doc.
Callers 1
- luaM_irealloc lua
Callees 5
- SMemAlloc storm
- SMemReAlloc storm
- SMemFree storm
- PoolChunkArrayInit lua
- PoolAllocBlock lua
Calls and jumps by a bare address, from tables/calls.tsv.