SkChunkAlloc Class Reference
#include <SkChunkAlloc.h>
List of all members.
Detailed Description
Definition at line 22 of file SkChunkAlloc.h.
Member Enumeration Documentation
- Enumerator:
kReturnNil_AllocFailType |
|
kThrow_AllocFailType |
|
Definition at line 39 of file SkChunkAlloc.h.
Constructor & Destructor Documentation
SkChunkAlloc::SkChunkAlloc |
( |
size_t |
minSize |
) |
|
SkChunkAlloc::~SkChunkAlloc |
( |
|
) |
|
Member Function Documentation
void* SkChunkAlloc::allocThrow |
( |
size_t |
bytes |
) |
[inline] |
void SkChunkAlloc::reset |
( |
|
) |
|
Free up all allocated blocks. This invalidates all returned pointers.
void SkChunkAlloc::reuse |
( |
|
) |
|
Reuse all allocated blocks. This invalidates all returned pointers (like reset) but doesn't necessarily free up all of the privately allocated blocks. This is more efficient if you plan to reuse the allocator multiple times.
size_t SkChunkAlloc::totalCapacity |
( |
|
) |
const [inline] |
size_t SkChunkAlloc::unalloc |
( |
void * |
ptr |
) |
|
Call this to unalloc the most-recently allocated ptr by alloc(). On success, the number of bytes freed is returned, or 0 if the block could not be unallocated. This is a hint to the underlying allocator that the previous allocation may be reused, but the implementation is free to ignore this call (and return 0).
The documentation for this class was generated from the following file: