fixed off-by-one bug
[swftools.git] / lib / mem.h
blobe864bbf0be78eaeb2dabc30609a4d29ad2e4bdb8
1 #ifndef __mem_h__
2 #define __mem_h__
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include "../config.h"
10 #define ALLOC_ARRAY(type, num) (((type)*)rfxalloc(sizeof(type)*(num)))
11 void* rfx_alloc(int size);
12 void* rfx_calloc(int size);
13 void* rfx_realloc(void*data, int size);
14 void rfx_free(void*data);
15 #ifndef HAVE_CALLOC
16 void* rfx_calloc_replacement(int nmemb, int size);
17 #endif
18 #ifdef MEMORY_INFO
19 long rfx_memory_used();
20 char* rfx_memory_used_str();
21 #endif
23 #ifdef __cplusplus
25 #endif
27 #endif //__mem_h__