luaM_growaux
function · lua · boundary
- Address
0x6fc900· 114 bytes, up to0x6fc971- Meaning
- Doubles a vector's capacity, at least 4 and at most a limit, raising a message past it
- Confidence
- verified, proof two
- Finding
- lua/object#allocation
Finding: Allocation in lua: objects and tables
The Lua core allocates through luaM_irealloc, which takes the state, the block, the old size, the
new size, a source path and a line, and is the one caller of luaM_reallocPool. It adds the new size less the old to the block
count at +0x28 of the global state when there is a state, then reallocates through
luaM_reallocPool with the block and the new size; the path and the line are never read.
luaM_growaux grows a vector: it doubles the capacity, takes 4 below 4, and near the limit takes the
limit while 4 places remain, else raises the caller's message.
| function | name | decided by |
|---|---|---|
0x6fc980 | luaM_irealloc | no state skips the count (0x6fc983, 0x6fc989), old size out and new size in (0x6fc996..0x6fc99e), luaM_reallocPool (0x6fc9a4), ret 0x10 (0x6fc9ab) |
0x6fc900 | luaM_growaux | doubled, at least 4 (0x6fc90e..0x6fc919), half the limit (0x6fc920..0x6fc92a), the limit (0x6fc92c..0x6fc936), luaG_runerror (0x6fc93f), luaM_irealloc in lmem.c (0x6fc962), size stored (0x6fc967) |
The derivation is in the doc.
Callers 5
- luaI_registerlocalvar lua
- pushclosure lua
- indexupvalue lua
- addk lua
- luaK_code lua
Callees 2
- luaG_runerror lua
- luaM_irealloc lua
Calls and jumps by a bare address, from tables/calls.tsv.