new test function 'T.allocount' to restrict number of allocations

before a memory-allocation error
This commit is contained in:
Roberto Ierusalimschy
2017-12-07 16:51:39 -02:00
parent 9fa1baf6de
commit cc01d46247
2 changed files with 20 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltests.h,v 2.52 2017/11/13 12:19:35 roberto Exp roberto $
** $Id: ltests.h,v 2.53 2017/11/23 16:35:54 roberto Exp roberto $
** Internal Header for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -57,6 +57,7 @@ typedef struct Memcontrol {
unsigned long total;
unsigned long maxmem;
unsigned long memlimit;
unsigned long countlimit;
unsigned long objcount[LUA_NUMTAGS];
} Memcontrol;