lua

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

commit a5862498a19cc8a25ef22b29c1e7103c5c0466f8
parent 2b5bc5d1a81579a76c13e638de2592e2c39c73f0
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 16 Nov 1994 16:08:52 -0200

set first position of a free block to -1, to catch errors

Diffstat:
Mluamem.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/luamem.c b/luamem.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_mem = "$Id: $"; +char *rcs_mem = "$Id: mem.c,v 1.1 1994/11/16 17:38:08 roberto Exp $"; #include <stdlib.h> @@ -12,6 +12,7 @@ char *rcs_mem = "$Id: $"; void luaI_free (void *block) { + *((int *)block) = -1; /* to catch errors */ free(block); }