Coconut Framework  beta
CNResource.h
Go to the documentation of this file.
1 
8 #ifndef CNResource_H
9 #define CNResource_H
10 
11 #include "CNMemoryProfile.h"
12 #include <stdlib.h>
13 
15 struct CNResource ;
16 
18 #define CNUnitSizeOfResource 32
19 
24 struct CNResource *
25 CNAllocateResource(void) ;
26 
31 void
32 CNFreeResource(struct CNResource * resource) ;
33 
40 void *
41 CNAllocateData(struct CNResource * resource, size_t size) ;
42 
49 void
50 CNReleaseData(struct CNResource * resource, size_t size, void * src) ;
51 
57 void
58 CNProfileOfResource(struct CNMemoryProfile * dst, const struct CNResource * resource) ;
59 
60 #endif /* CNResource_H */
61 
Information to present memory profile.
Definition: CNMemoryProfile.h:16
void CNProfileOfResource(struct CNMemoryProfile *dst, const struct CNResource *resource)
Get memory profile of resource.
Define CNMemoryProfile data structure.
void CNReleaseData(struct CNResource *resource, size_t size, void *src)
Release memory object into resource.
void CNFreeResource(struct CNResource *resource)
Deallocate all memory object in the source resource.
void * CNAllocateData(struct CNResource *resource, size_t size)
Allocate data memory.
struct CNResource * CNAllocateResource(void)
Allocate CNResource object.