Tables have a 'lastfree' information only when needed

Only tables with some minimum number of entries in their hash part
have a 'lastfree' field, kept in a header before the node vector.
This commit is contained in:
Roberto Ierusalimschy
2022-11-01 15:42:08 -03:00
parent ee645472eb
commit 8047b2d03e
7 changed files with 84 additions and 24 deletions

2
lmem.h
View File

@@ -63,6 +63,8 @@
#define luaM_newobject(L,tag,s) luaM_malloc_(L, (s), tag)
#define luaM_newblock(L, size) luaM_newvector(L, size, char)
#define luaM_growvector(L,v,nelems,size,t,limit,e) \
((v)=cast(t *, luaM_growaux_(L,v,nelems,&(size),sizeof(t), \
luaM_limitN(limit,t),e)))