luaM_irealloc
function · lua · boundary
- Address
0x6fc980· 46 bytes, up to0x6fc9ad- Meaning
- Adds the size change to the block count and reallocates through luaM_reallocPool, ignoring the file and line
- Confidence
- verified, proof two
- Name from
- the community database (idb)
- 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 34
- luaD_reallocstack lua
- luaD_reallocCI lua
- luaD_protectedparser lua
- mallocstate lua
- stack_init lua
- freestate lua
- freestack lua
- f_luaopen lua
- close_state lua
- freeobj lua
- checkSizes lua
- luaS_freeall lua
- luaS_resize lua
- newlstr lua
- luaS_newudata lua
- luaF_newCclosure lua
- luaF_newLclosure lua
- luaF_findupval lua
- luaF_newproto lua
- luaF_freeproto lua
- luaF_freeclosure lua
- luaH_new lua
- setarrayvector lua
- setnodevector lua
- luaH_free lua
- resize lua
- luaZ_openspace lua
- luaM_growaux lua
- close_func lua
- LoadCode lua
- LoadLocals lua
- LoadLines lua
- LoadUpvalues lua
- LoadConstants lua
Callees 1
- luaM_reallocPool lua
Calls and jumps by a bare address, from tables/calls.tsv.