CLISH  0.7.3
dblockpool.h
1 
24 /*---------------------------------------------------------------
25  * HISTORY
26  * 24-Feb-2006 Graeme McKerrell
27  * Initial version
28  *---------------------------------------------------------------
29  * Copyright (C) 2006 Newport Networks. All Rights Reserved.
30  *--------------------------------------------------------------- */
31 #ifndef _lub_dblockpool_h
32 #define _lub_dblockpool_h
33 #include <stddef.h>
34 
35 #include "c_decl.h"
36 
37 _BEGIN_C_DECL
38 
39 /****************************************************************
40  * TYPE DEFINITIONS
41  **************************************************************** */
50 {
51  struct _lub_dblockpool_chunk *first_chunk;
52  size_t block_size;
53  unsigned chunk_size;
54  unsigned max_chunks;
55 };
56 
57 /****************************************************************
58  * DBLOCKPOOL OPERATIONS
59  **************************************************************** */
70 extern void
75  lub_dblockpool_t *instance,
79  size_t blocksize,
83  unsigned chunksize,
88  unsigned max_chunks
89  );
97 extern void
102  lub_dblockpool_t *instance
103  );
118 extern void *
123  lub_dblockpool_t *instance
124  );
136 extern void
141  lub_dblockpool_t *instance,
145  void *block
146  );
147 
148 _END_C_DECL
149 
150 #endif /* _lub_dblockpool_h */
151 
void lub_dblockpool_init(lub_dblockpool_t *instance, size_t blocksize, unsigned chunksize, unsigned max_chunks)
void lub_dblockpool_fini(lub_dblockpool_t *instance)
Definition: dblockpool.h:49
void lub_dblockpool_free(lub_dblockpool_t *instance, void *block)
void * lub_dblockpool_alloc(lub_dblockpool_t *instance)