using 'lastfree == NULL' to signal that table is using the dummy

node for its hash part + new macro 'allocsizenode'
This commit is contained in:
Roberto Ierusalimschy
2016-11-07 10:38:35 -02:00
parent 697593d8d5
commit 7b1fba69b7
4 changed files with 38 additions and 30 deletions

4
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 2.212 2016/03/31 19:02:03 roberto Exp roberto $
** $Id: lgc.c,v 2.213 2016/10/19 12:31:42 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -467,7 +467,7 @@ static lu_mem traversetable (global_State *g, Table *h) {
else /* not weak */
traversestrongtable(g, h);
return sizeof(Table) + sizeof(TValue) * h->sizearray +
sizeof(Node) * cast(size_t, sizenode(h));
sizeof(Node) * cast(size_t, allocsizenode(h));
}