ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

lmem.h

Go to the documentation of this file.
00001 /*
00002 ** Interface to Memory Manager
00003 ** See Copyright Notice in lua.h
00004 */
00005 
00006 #ifndef GRIM_LMEM_H
00007 #define GRIM_LMEM_H
00008 
00009 #include "common/scummsys.h"
00010 
00011 namespace Grim {
00012 
00013 // memory error messages
00014 #define codeEM      "code size overflow"
00015 #define constantEM  "constant table overflow"
00016 #define refEM       "reference table overflow"
00017 #define tableEM     "table overflow"
00018 #define memEM       "not enough memory"
00019 
00020 void *luaM_realloc (void *oldblock, int32 size);
00021 int32 luaM_growaux (void **block, int32 nelems, int32 size, const char *errormsg, int32 limit);
00022 
00023 #define luaM_free(b)                        free((b))
00024 #define luaM_malloc(t)                      malloc((t))
00025 #define luaM_new(t)                         ((t *)malloc(sizeof(t)))
00026 #define luaM_newvector(n, t)                ((t *)malloc((n) * sizeof(t)))
00027 #define luaM_growvector(old, n, t, e, l)    (luaM_growaux((void**)old, n, sizeof(t), e, l))
00028 #define luaM_reallocvector(v, n, t)         ((t *)realloc(v,(n) * sizeof(t)))
00029 
00030 #ifdef LUA_DEBUG
00031 extern int32 numblocks;
00032 extern int32 totalmem;
00033 #endif
00034 
00035 } // end of namespace Grim
00036 
00037 #endif
00038 


Generated on Sat Aug 17 2019 05:00:37 for ResidualVM by doxygen 1.7.1
curved edge   curved edge