src/server/util/pool_pvt.h

changeset 415
d938228c382e
parent 40
56cda23f48d4
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
35 #define BASE_POOL_PVT_H 35 #define BASE_POOL_PVT_H
36 36
37 #ifndef BASE_POOL_H 37 #ifndef BASE_POOL_H
38 #include "pool.h" 38 #include "pool.h"
39 #include <inttypes.h> 39 #include <inttypes.h>
40 #include <cx/allocator.h>
40 #endif /* BASE_POOL_H */ 41 #endif /* BASE_POOL_H */
41 42
42 /* 43 /*
43 * pool_pvt.h - private definitions for memory pools 44 * pool_pvt.h - private definitions for memory pools
44 */ 45 */
145 * itself. Once the memory is allocated it is allocated until the 146 * itself. Once the memory is allocated it is allocated until the
146 * entire pool is freed. 147 * entire pool is freed.
147 */ 148 */
148 typedef struct pool_t pool_t; 149 typedef struct pool_t pool_t;
149 struct pool_t { 150 struct pool_t {
151 CxAllocator allocator; /* ucx allocator interface */
150 block_t *curr_block; /* current block being used */ 152 block_t *curr_block; /* current block being used */
151 block_t *used_blocks; /* blocks that are all used up */ 153 block_t *used_blocks; /* blocks that are all used up */
152 block_t *free_blocks; /* blocks that are free */ 154 block_t *free_blocks; /* blocks that are free */
153 int32_t free_size; /* number of bytes in free_blocks */ 155 int32_t free_size; /* number of bytes in free_blocks */
154 int32_t free_num; /* number of blocks in free_blocks */ 156 int32_t free_num; /* number of blocks in free_blocks */

mercurial