diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:41:53 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-05-23 12:41:53 -0300 |
commit | e131eb0d9a6252e41e1a46319c95f7dbb0a435c9 (patch) | |
tree | 9515bc428555bc0cacbc0bf452d69fba812f7a4d /lmem.c | |
parent | 054c20cd5b1d9491e3989cedcf3da5ebed0719cf (diff) | |
download | lua-e131eb0d9a6252e41e1a46319c95f7dbb0a435c9.tar.gz lua-e131eb0d9a6252e41e1a46319c95f7dbb0a435c9.tar.bz2 lua-e131eb0d9a6252e41e1a46319c95f7dbb0a435c9.zip |
removed debug code
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.82 2011/09/20 19:25:23 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.83 2011/11/30 12:42:49 roberto Exp roberto $ |
3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -94,22 +94,6 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { | |||
94 | } | 94 | } |
95 | lua_assert((nsize == 0) == (newblock == NULL)); | 95 | lua_assert((nsize == 0) == (newblock == NULL)); |
96 | g->GCdebt = (g->GCdebt + nsize) - realosize; | 96 | g->GCdebt = (g->GCdebt + nsize) - realosize; |
97 | #if defined(TRACEMEM) | ||
98 | { /* auxiliary patch to monitor garbage collection. | ||
99 | ** To plot, gnuplot with following command: | ||
100 | ** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines | ||
101 | */ | ||
102 | static unsigned long total = 0; /* our "time" */ | ||
103 | static FILE *f = NULL; /* output file */ | ||
104 | total++; /* "time" always grows */ | ||
105 | if ((total % 200) == 0) { | ||
106 | if (f == NULL) f = fopen(TRACEMEM, "w"); | ||
107 | fprintf(f, "%lu %u %d %d\n", total, | ||
108 | gettotalbytes(g), g->GCdebt, g->gcstate * 10000); | ||
109 | } | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | return newblock; | 97 | return newblock; |
114 | } | 98 | } |
115 | 99 | ||