#include <stddef.h>
#include "llimits.h"
#include "lua.h"
Go to the source code of this file.
Defines | |
#define | MEMERRMSG "not enough memory" |
#define | luaM_free(L, b, s) luaM_realloc(L, (b), (s), 0) |
#define | luaM_freelem(L, b) luaM_realloc(L, (b), sizeof(*(b)), 0) |
#define | luaM_freearray(L, b, n, t) |
#define | luaM_malloc(L, t) luaM_realloc(L, NULL, 0, (t)) |
#define | luaM_new(L, t) cast(t *, luaM_malloc(L, sizeof(t))) |
#define | luaM_newvector(L, n, t) |
#define | luaM_growvector(L, v, nelems, size, t, limit, e) |
#define | luaM_reallocvector(L, v, oldn, n, t) |
Functions | |
void * | luaM_realloc (lua_State *L, void *oldblock, lu_mem oldsize, lu_mem size) |
void * | luaM_growaux (lua_State *L, void *block, int *size, int size_elem, int limit, const char *errormsg) |
|
Definition at line 28 of file lmem.h. Referenced by freeobj(), freestate(), and luaF_freeclosure(). |
|
Value: luaM_realloc(L, (b), \ cast(lu_mem, n)*cast(lu_mem, sizeof(t)), 0) Definition at line 30 of file lmem.h. Referenced by freestack(), luaF_freeproto(), luaH_free(), luaS_freeall(), luaS_resize(), and resize(). |
|
Definition at line 29 of file lmem.h. Referenced by close_state(), freeobj(), luaF_freeproto(), and luaH_free(). |
|
Value: if (((nelems)+1) > (size)) \ ((v)=cast(t *, luaM_growaux(L,v,&(size),sizeof(t),limit,e))) Definition at line 38 of file lmem.h. Referenced by addk(), indexupvalue(), luaI_registerlocalvar(), luaK_code(), and pushclosure(). |
|
Definition at line 33 of file lmem.h. Referenced by luaF_newCclosure(), luaF_newLclosure(), luaS_newudata(), mallocstate(), and newlstr(). |
|
Definition at line 34 of file lmem.h. Referenced by f_luaopen(), luaF_findupval(), luaF_newproto(), and luaH_new(). |
|
Value: Definition at line 35 of file lmem.h. Referenced by LoadCode(), LoadConstants(), LoadLines(), LoadLocals(), LoadUpvalues(), luaS_resize(), setnodevector(), and stack_init(). |
|
Value: ((v)=cast(t *, luaM_realloc(L, v,cast(lu_mem, oldn)*cast(lu_mem, sizeof(t)), \ cast(lu_mem, n)*cast(lu_mem, sizeof(t))))) Definition at line 42 of file lmem.h. Referenced by close_func(), luaD_reallocCI(), luaD_reallocstack(), luaZ_openspace(), resize(), and setarrayvector(). |
|
Definition at line 16 of file lmem.h. Referenced by f_luaopen(), and seterrorobj(). |
|
Definition at line 43 of file lmem.c. References cast, luaG_runerror(), luaM_realloc(), and MINSIZEARRAY. |
|
Definition at line 65 of file lmem.c. References G, l_free, l_realloc, lua_assert, luaD_throw(), luaG_runerror(), and MAX_SIZET. Referenced by luaM_growaux(). |