Coconut Framework  beta
CNResourcePool.h
Go to the documentation of this file.
1 
8 #ifndef CNResourcePool_H
9 #define CNResourcePool_H
10 
11 #include "CNMemoryProfile.h"
12 #include "CNResourceLinks.h"
13 #include <unistd.h>
14 
22  size_t itemSize ;
24  struct CNResourceLinks * listItemPool ;
29 } ;
30 
37 struct CNResourcePool *
38 CNAllocateResourcePool(struct CNResourceLinks * pool, size_t size) ;
39 
44 void
45 CNFreeResourcePool(struct CNResourcePool * pool) ;
46 
51 void *
53 
59 void
60 CNReleaseDataToResourcePool(struct CNResourcePool * pool, void * src) ;
61 
67 void
68 CNProfileOfResourcePool(struct CNMemoryProfile * dst, const struct CNResourcePool * pool) ;
69 
70 #endif /* CNResourcePool_H */
struct CNResourceLinks * listItemPool
Definition: CNResourcePool.h:24
void CNProfileOfResourcePool(struct CNMemoryProfile *dst, const struct CNResourcePool *pool)
Get memory profile of resource pool.
struct CNResourceLink * freeItems
Definition: CNResourcePool.h:26
void * CNAllocateDataToResourcePool(struct CNResourcePool *pool)
Allocate data in the resource.
Information to present memory profile.
Definition: CNMemoryProfile.h:16
struct CNResourcePool * nextPool
Definition: CNResourcePool.h:20
Define CNMemoryProfile data structure.
struct CNResourcePool * CNAllocateResourcePool(struct CNResourceLinks *pool, size_t size)
Allocate CNResourcePool object.
void CNReleaseDataToResourcePool(struct CNResourcePool *pool, void *src)
Release data to the resource pool.
struct CNResourceLink * pageItems
Definition: CNResourcePool.h:28
Resource pool to keep same size objects.
Definition: CNResourcePool.h:18
size_t itemSize
Definition: CNResourcePool.h:22
void CNFreeResourcePool(struct CNResourcePool *pool)
Deallocate CNResourcePool object.