mirror of https://github.com/lua/lua.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
487 B
23 lines
487 B
/*
|
|
** mem.c
|
|
** memory manager for lua
|
|
** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp roberto $
|
|
*/
|
|
|
|
#ifndef mem_h
|
|
#define mem_h
|
|
|
|
#ifndef NULL
|
|
#define NULL 0
|
|
#endif
|
|
|
|
void luaI_free (void *block);
|
|
void *luaI_malloc (unsigned long size);
|
|
void *luaI_realloc (void *oldblock, unsigned long size);
|
|
|
|
#define new(s) ((s *)luaI_malloc(sizeof(s)))
|
|
#define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
|
|
#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s)))
|
|
|
|
#endif
|
|
|
|
|