// there are 71 allocations.
class SkArenaAlloc {
public:
- SkArenaAlloc(char* block, size_t size, size_t extraSize = 0);
+ SkArenaAlloc(char* block, size_t size, size_t extraSize);
template <size_t kSize>
SkArenaAlloc(char (&block)[kSize], size_t extraSize = kSize)
created = 0;
destroyed = 0;
- SkArenaAlloc arena{nullptr, 0};
+ SkArenaAlloc arena{0};
REPORTER_ASSERT(r, *arena.make<int>(3) == 3);
Foo* foo = arena.make<Foo>(3, 4.0f);
REPORTER_ASSERT(r, foo->x == 3);
created = 0;
destroyed = 0;
std::unique_ptr<char[]> block{new char[1024]};
- SkArenaAlloc arena{block.get(), 1024};
+ SkArenaAlloc arena{block.get(), 1024, 0};
REPORTER_ASSERT(r, *arena.make<int>(3) == 3);
Foo* foo = arena.make<Foo>(3, 4.0f);