#include <stdlib.h>
#include <stdio.h>
#include "memory.h"

Defines | |
| #define | PARANOID 0 |
Functions | |
| PUBLIC void * | Memory_malloc (size_t size) |
| Allocates memory blocks. | |
| PUBLIC void * | Memory_calloc (size_t num, size_t size) |
| Allocates an array in memory with elements initialized to 0. | |
| PUBLIC void * | Memory_realloc (void *memblock, size_t size) |
| Reallocate memory blocks. | |
| PUBLIC void | Memory_free (void *memblock) |
| Deallocates or frees a memory block. | |
| PUBLIC void | Memory_outofmem (const char *name, const char *file, W32 line) |
| Print message out of memory. | |
| PUBLIC void* Memory_calloc | ( | size_t | num, | |
| size_t | size | |||
| ) |
Allocates an array in memory with elements initialized to 0.
| [in] | num | Number of elements. |
| [in] | size | Bytes to allocate. |
| PUBLIC void Memory_free | ( | void * | memblock | ) |
Deallocates or frees a memory block.
| [in] | memblock | Previously allocated memory block to be freed. |
| PUBLIC void* Memory_malloc | ( | size_t | size | ) |
Allocates memory blocks.
| [in] | size | Bytes to allocate. |
| PUBLIC void Memory_outofmem | ( | const char * | name, | |
| const char * | file, | |||
| W32 | line | |||
| ) |
Print message out of memory.
| [in] | name | Name of function this occurred in. |
| [in] | file | File name that this occurred in. |
| [in] | line | Line number this occurred on. |
| PUBLIC void* Memory_realloc | ( | void * | memblock, | |
| size_t | size | |||
| ) |
Reallocate memory blocks.
| [in] | memblock | Pointer to previously allocated memory block. |
| [in] | size | Bytes to allocate. |