summaryrefslogtreecommitdiff
path: root/lib/mem.h
blob: ee60920bdc9d23d5e6c9d04628795ccb8f8d4570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __mem_h__
#define __mem_h__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h>

#include "../config.h"

#define ALLOC_ARRAY(type, num) (((type)*)rfxalloc(sizeof(type)*(num)))
void* rfx_alloc(int size);
void* rfx_calloc(int size);
void* rfx_realloc(void*data, int size);
void rfx_free(void*data);
#ifndef HAVE_CALLOC
void* rfx_calloc_replacement(int nmemb, int size);
#endif
#ifdef MEMORY_INFO
long rfx_memory_used();
char* rfx_memory_used_str();
#endif

#ifdef __cplusplus
}
#endif

#endif //__mem_h__