From 38da8c0d7d69da5eed2e98a0871b86113869b858 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 4 Dec 2002 15:29:05 -0200 Subject: new facilities to test memory overflow in main.c --- ltests.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index f1f50364..6846841d 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.145 2002/11/18 15:24:27 roberto Exp roberto $ +** $Id: ltests.c,v 1.146 2002/11/25 17:47:13 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -784,4 +784,13 @@ int luaB_opentests (lua_State *L) { return 0; } + +#undef main +int main (int argc, char *argv[]) { + char *limit = getenv("MEMLIMIT"); + if (limit) + memdebug_memlimit = strtoul(limit, NULL, 10); + l_main(argc, argv); +} + #endif -- cgit v1.2.3-55-g6feb