summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/mempool.h
blob: d35392150d81c17f623da90e455160ab5f715f88 (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
#ifndef __TRITON_MEMPOOL_H
#define __TRITON_MEMPOOL_H

#include <stdint.h>

struct mempool_stat_t
{
	uint32_t allocated;	
	uint32_t available;
};

typedef void * mempool_t;
mempool_t *mempool_create(int size);
void mempool_free(void*);
struct mempool_stat_t mempool_get_stat(void);

#ifdef MEMDEBUG
void *mempool_alloc_md(mempool_t*, const char *fname, int line);
#define mempool_alloc(pool) mempool_alloc_md(pool, __FILE__, __LINE__)
#else
void *mempool_alloc(mempool_t*);
#endif

#endif