1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +00:00

Upgrading to Lua 5.2.1. (Should be harmless upgrade, bug-fix only.)

This commit is contained in:
batrick
2012-06-16 06:02:57 +00:00
parent 8ad2c789b9
commit 9a0e881b2b
36 changed files with 926 additions and 606 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lmem.c,v 1.83 2011/11/30 12:42:49 roberto Exp $
** $Id: lmem.c,v 1.84 2012/05/23 15:41:53 roberto Exp $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -94,22 +94,6 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) {
}
lua_assert((nsize == 0) == (newblock == NULL));
g->GCdebt = (g->GCdebt + nsize) - realosize;
#if defined(TRACEMEM)
{ /* auxiliary patch to monitor garbage collection.
** To plot, gnuplot with following command:
** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines
*/
static unsigned long total = 0; /* our "time" */
static FILE *f = NULL; /* output file */
total++; /* "time" always grows */
if ((total % 200) == 0) {
if (f == NULL) f = fopen(TRACEMEM, "w");
fprintf(f, "%lu %u %d %d\n", total,
gettotalbytes(g), g->GCdebt, g->gcstate * 10000);
}
}
#endif
return newblock;
}