1994-11-16 09:39:16 -08:00
|
|
|
/*
|
|
|
|
** mem.c
|
|
|
|
** memory manager for lua
|
1996-03-14 07:55:49 -08:00
|
|
|
** $Id: mem.h,v 1.3 1996/02/22 20:34:33 roberto Exp roberto $
|
1994-11-16 09:39:16 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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);
|
1996-03-14 07:55:49 -08:00
|
|
|
void* luaI_buffer (unsigned long size);
|
1994-11-16 09:39:16 -08:00
|
|
|
|
|
|
|
#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
|
|
|
|
|