|
Coconut Framework
beta
|
Define CNResource data structure. More...
Go to the source code of this file.
Macros | |
| #define | CNUnitSizeOfResource 32 |
Functions | |
| struct CNResource * | CNAllocateResource (void) |
| Allocate CNResource object. More... | |
| void | CNFreeResource (struct CNResource *resource) |
| Deallocate all memory object in the source resource. More... | |
| void * | CNAllocateData (struct CNResource *resource, size_t size) |
| Allocate data memory. More... | |
| void | CNReleaseData (struct CNResource *resource, size_t size, void *src) |
| Release memory object into resource. More... | |
| void | CNProfileOfResource (struct CNMemoryProfile *dst, const struct CNResource *resource) |
| Get memory profile of resource. More... | |
Define CNResource data structure.
| #define CNUnitSizeOfResource 32 |
Unit memory allocation size
| struct CNResource* CNAllocateResource | ( | void | ) |
Allocate CNResource object.
| void CNFreeResource | ( | struct CNResource * | resource | ) |
Deallocate all memory object in the source resource.
| resource | Destination resource to be deallocated |
| void* CNAllocateData | ( | struct CNResource * | resource, |
| size_t | size | ||
| ) |
Allocate data memory.
| resource | Resource to allocate the object |
| size | Required size |
Referenced by CNAllocateListItem(), and CNAllocateObject().
| void CNReleaseData | ( | struct CNResource * | resource, |
| size_t | size, | ||
| void * | src | ||
| ) |
Release memory object into resource.
| resource | Destination resource |
| size | Size of released memory object |
| src | Source memory object |
Referenced by CNReleaseListItem().
| void CNProfileOfResource | ( | struct CNMemoryProfile * | dst, |
| const struct CNResource * | resource | ||
| ) |
Get memory profile of resource.
| dst | Destination profile |
| resource | Source resource |
1.8.5