kb_memory.c File Reference

Include dependency graph for kb_memory.c:

Go to the source code of this file.

Functions

void * kb_alloc (unsigned long size)
void * kb_realloc (void *ptr, unsigned long size)


Function Documentation

void* kb_alloc ( unsigned long  size  ) 

This function allocates safely memory. Produces an fatal error when no more memory is available.

Parameters:
size size in bytes
Returns:
pointer to memory allocated

Definition at line 21 of file kb_memory.c.

References KB_ERROR_NOMEM, and KB_FATAL.

Referenced by knet_init(), koa_net_playsound(), and main().

void* kb_realloc ( void *  ptr,
unsigned long  size 
)

This function reallocates safely memory. Produces an fatal error when no more memory is available

Parameters:
ptr Pointer to the block of memory to resize
size New size of the memory block
Returns:
a pointer on the new memory block

Definition at line 40 of file kb_memory.c.

References KB_ERROR_NOMEM, and KB_FATAL.

Referenced by knet_printf(), and knet_vprintf().


Generated on Wed Dec 15 11:49:28 2010 for KoreBot Library by  doxygen 1.5.5