- Type_ *malloc(size_t size) {
- size = align(size);
-
- if (size > size_) {
- size_ = std::max<size_t>(next_, size + align(sizeof(Cleaner)));
+ Type_ *malloc(size_t size, size_t alignment = CYAlignment) {
+ uint8_t *end(data_);
+ CYAlign(end, alignment);
+ end += size;
+
+ if (size_t(end - data_) > size_) {
+ size_t need(sizeof(Cleaner));
+ CYAlign(need, alignment);
+ need += size;
+ size_ = std::max<size_t>(next_, need);