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.3 1997/12/01 20:30:44 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.4 1997/12/17 20:48:58 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 | */ |
@@ -57,7 +57,6 @@ void *luaM_realloc (void *block, unsigned long size) | |||
57 | #else | 57 | #else |
58 | /* DEBUG */ | 58 | /* DEBUG */ |
59 | 59 | ||
60 | #include <assert.h> | ||
61 | #include <string.h> | 60 | #include <string.h> |
62 | 61 | ||
63 | 62 | ||
@@ -71,7 +70,8 @@ static void *checkblock (void *block) | |||
71 | { | 70 | { |
72 | unsigned long *b = (unsigned long *)block - 1; | 71 | unsigned long *b = (unsigned long *)block - 1; |
73 | unsigned long size = *b; | 72 | unsigned long size = *b; |
74 | assert(*(((char *)b)+size+sizeof(unsigned long)) == MARK); | 73 | LUA_ASSERT(*(((char *)b)+size+sizeof(unsigned long)) == MARK, |
74 | "corrupted block"); | ||
75 | numblocks--; | 75 | numblocks--; |
76 | totalmem -= size; | 76 | totalmem -= size; |
77 | return b; | 77 | return b; |