diff options
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.77 2010/04/30 18:17:24 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.78 2010/05/04 18:10:02 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 | */ |
@@ -98,13 +98,13 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { | |||
98 | if (!gcstopped(g)) | 98 | if (!gcstopped(g)) |
99 | g->GCdebt += nsize; /* give some credit to garbage collector */ | 99 | g->GCdebt += nsize; /* give some credit to garbage collector */ |
100 | #if defined(TRACEMEM) | 100 | #if defined(TRACEMEM) |
101 | { /* auxiliar patch to monitor garbage collection. | 101 | { /* auxiliary patch to monitor garbage collection. |
102 | ** To plot, gnuplot with following command: | 102 | ** To plot, gnuplot with following command: |
103 | ** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines | 103 | ** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines |
104 | */ | 104 | */ |
105 | static unsigned long total = 0; /* our "time" */ | 105 | static unsigned long total = 0; /* our "time" */ |
106 | static FILE *f = NULL; /* output file */ | 106 | static FILE *f = NULL; /* output file */ |
107 | total++; /* "time" always grow */ | 107 | total++; /* "time" always grows */ |
108 | if ((total % 200) == 0) { | 108 | if ((total % 200) == 0) { |
109 | if (f == NULL) f = fopen(TRACEMEM, "w"); | 109 | if (f == NULL) f = fopen(TRACEMEM, "w"); |
110 | fprintf(f, "%lu %u %d %d\n", total, | 110 | fprintf(f, "%lu %u %d %d\n", total, |