8#ifndef GrMemoryPool_DEFINED
9#define GrMemoryPool_DEFINED
32#ifdef SK_FORCE_8_BYTE_ALIGNMENT
39 static constexpr size_t kAlignment =
alignof(std::max_align_t);
55 static std::unique_ptr<GrMemoryPool>
Make(
size_t preallocSize,
size_t minAllocSize);
58 void operator delete(
void* p) { ::operator
delete(p); }
96 static_assert(std::is_standard_layout<GrMemoryPool>::value,
"");
108 void validate()
const;
120#if defined(SK_DEBUG) || defined(SK_SANITIZE_ADDRESS)
133 int fAllocationCount;
135 Debug* fDebug{
nullptr};
void * allocate(size_t size)
static constexpr size_t kAlignment
static std::unique_ptr< GrMemoryPool > Make(size_t preallocSize, size_t minAllocSize)
static constexpr size_t kMinAllocationSize
size_t preallocSize() const
size_t preallocSize() const
const Block * headBlock() const
const Block * currentBlock() const