aboutsummaryrefslogtreecommitdiff
path: root/lmem.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-25 18:07:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-25 18:07:26 -0300
commit6a853fcb8b9e333d768c739c36c99b144bbde607 (patch)
tree5645e5fbe3a43f15044591be30c5d4607cb7357c /lmem.c
parent31bea2190b25e5b6687d92d807af522378168bfa (diff)
downloadlua-6a853fcb8b9e333d768c739c36c99b144bbde607.tar.gz
lua-6a853fcb8b9e333d768c739c36c99b144bbde607.tar.bz2
lua-6a853fcb8b9e333d768c739c36c99b144bbde607.zip
details (from lhf)
Diffstat (limited to 'lmem.c')
-rw-r--r--lmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lmem.c b/lmem.c
index b4947b6c..82159876 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.c,v 1.10 1999/02/24 17:55:51 roberto Exp roberto $ 2** $Id: lmem.c,v 1.11 1999/02/25 15:16:26 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*/
@@ -59,7 +59,7 @@ void *luaM_growaux (void *block, unsigned long nelems, int inc, int size,
59void *luaM_realloc (void *block, unsigned long size) { 59void *luaM_realloc (void *block, unsigned long size) {
60 size_t s = (size_t)size; 60 size_t s = (size_t)size;
61 if (s != size) 61 if (s != size)
62 lua_error("Allocation Error: Block too big"); 62 lua_error("memory allocation error: block too big");
63 if (size == 0) { 63 if (size == 0) {
64 free(block); /* block may be NULL, that is OK for free */ 64 free(block); /* block may be NULL, that is OK for free */
65 return NULL; 65 return NULL;
@@ -100,7 +100,7 @@ static void *checkblock (void *block) {
100void *luaM_realloc (void *block, unsigned long size) { 100void *luaM_realloc (void *block, unsigned long size) {
101 unsigned long realsize = HEADER+size+1; 101 unsigned long realsize = HEADER+size+1;
102 if (realsize != (size_t)realsize) 102 if (realsize != (size_t)realsize)
103 lua_error("Allocation Error: Block too big"); 103 lua_error("memory allocation error: block too big");
104 if (size == 0) { 104 if (size == 0) {
105 if (block) { 105 if (block) {
106 unsigned long *b = (unsigned long *)((char *)block - HEADER); 106 unsigned long *b = (unsigned long *)((char *)block - HEADER);