-
Notifications
You must be signed in to change notification settings - Fork 70
/
cellmalloc.h
31 lines (24 loc) · 1.23 KB
/
cellmalloc.h
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
30
31
/********************************************************************
* APRX -- 2nd generation APRS iGate and digi with *
* minimal requirement of esoteric facilities or *
* libraries of any kind beyond UNIX system libc. *
* *
* (c) Matti Aarnio - OH2MQK, 2007-2014 *
* *
********************************************************************/
#ifndef _CELLMALLOC_H_
#define _CELLMALLOC_H_
/*
* cellmalloc() -- manages arrays of cells of data
*
*/
typedef struct cellarena_t cellarena_t;
extern cellarena_t *cellinit(const char *arenaname, const int cellsize, const int alignment, const int policy, const int createkb, const int minfree);
#define CELLMALLOC_POLICY_FIFO 0
#define CELLMALLOC_POLICY_LIFO 1
#define CELLMALLOC_POLICY_NOMUTEX 2
extern void *cellmalloc(cellarena_t *cellarena);
extern int cellmallocmany(cellarena_t *cellarena, void **array, const int numcells);
extern void cellfree(cellarena_t *cellarena, void *p);
extern void cellfreemany(cellarena_t *cellarena, void **array, const int numcells);
#endif