class BlockAllocator
Defined at line 19 of file ../../src/ui/lib/escher/util/block_allocator.h
A BlockAllocator allocates raw CPU data from fixed-size blocks. To minimize
overhead, allocations are not freed individually; the Reset() method frees
all allocations at once. Large allocations may exceed the size of a block;
these are allocated separately (although still freed at the same time).
Public Methods
void BlockAllocator (size_t fixed_size_block_size)
Defined at line 13 of file ../../src/ui/lib/escher/util/block_allocator.cc
void * Allocate (size_t size, size_t alignment)
Defined at line 18 of file ../../src/ui/lib/escher/util/block_allocator.cc
void BlockAllocator (BlockAllocator && other)
Defined at line 22 of file ../../src/ui/lib/escher/util/block_allocator.h
template <typename T>
T * Allocate ()
Defined at line 27 of file ../../src/ui/lib/escher/util/block_allocator.h
template <typename T>
T * AllocateMany (size_t count)
Defined at line 33 of file ../../src/ui/lib/escher/util/block_allocator.h
void Reset ()
Invalidates all previously-allocated pointers. Large blocks are freed, and
fixed-size blocks are made available for reuse.
Defined at line 36 of file ../../src/ui/lib/escher/util/block_allocator.cc
template <typename T>
T * AllocateInitialized (size_t count)
Defined at line 40 of file ../../src/ui/lib/escher/util/block_allocator.h
const BlockList & fixed_size_blocks ()
For debugging/testing.
Defined at line 79 of file ../../src/ui/lib/escher/util/block_allocator.h
const BlockList & large_blocks ()
Defined at line 80 of file ../../src/ui/lib/escher/util/block_allocator.h
const Block & current_fixed_size_block ()
Defined at line 81 of file ../../src/ui/lib/escher/util/block_allocator.h