lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 0160591998b3d1883691e96e0ddfe55463ae0d3a
parent c505f341d638f8f0adcef4df85bcc8def6c930a3
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 26 Dec 2005 11:35:25 -0200

removal of dead code

Diffstat:
Mlmem.c | 18+-----------------
1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/lmem.c b/lmem.c @@ -1,5 +1,5 @@ /* -** $Id: lmem.c,v 1.68 2005/01/14 14:21:16 roberto Exp roberto $ +** $Id: lmem.c,v 1.69 2005/02/23 17:30:22 roberto Exp roberto $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ @@ -81,22 +81,6 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { luaD_throw(L, LUA_ERRMEM); lua_assert((nsize == 0) == (block == NULL)); g->totalbytes = (g->totalbytes - osize) + nsize; -#if 0 - { /* auxiliar patch to monitor garbage collection */ - static unsigned long total = 0; /* our "time" */ - static lu_mem last = 0; /* last totalmem that generated an output */ - static FILE *f = NULL; /* output file */ - if (nsize <= osize) total += 1; /* "time" always grow */ - else total += (nsize - osize); - if ((int)g->totalbytes - (int)last > 1000 || - (int)g->totalbytes - (int)last < -1000) { - last = g->totalbytes; - if (f == NULL) f = fopen("trace", "w"); - fprintf(f, "%lu %u %u %u %d\n", total, g->totalbytes, g->GCthreshold, - g->estimate, g->gcstate); - } - } -#endif return block; }