Files
assaultcube-/source/enet/memory.c
T
driAn c6e385ea38 This commit was generated by cvs2svn to compensate for changes in r13,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@14 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2005-06-23 21:57:56 +00:00

49 lines
651 B
C
Executable File

/**
@file memory.c
@brief ENet memory management functions
*/
#define ENET_BUILDING_LIB 1
#include "enet/types.h"
#include "enet/memory.h"
void *
enet_malloc (size_t size)
{
void * memory = malloc (size);
if (memory == NULL)
abort ();
return memory;
}
void *
enet_realloc (void * memory, size_t size)
{
memory = realloc (memory, size);
if (size > 0 &&
memory == NULL)
abort ();
return memory;
}
void *
enet_calloc (size_t elements, size_t size)
{
void * memory = calloc (elements, size);
if (memory == NULL)
abort ();
return memory;
}
void
enet_free (void * memory)
{
free (memory);
}