reserveMemory();
}
- void reserveMemory() {
+ void reserveMemory(bool no_grow = false) {
if (!read_only_) {
// Reserve a named address for use during
// setNamedAddress(). Though this will almost always succeed
if (reserved_storage) {
break;
}
+ assert(!no_grow);
growSegment();
}
impl_->freeReservedMemory();
const bool result = impl_->base_sgmt_->all_memory_deallocated();
// reserveMemory() should succeed now as the memory was already
- // allocated.
- impl_->reserveMemory();
+ // allocated, so we set no_grow to true.
+ impl_->reserveMemory(true);
return (result);
} catch (...) {
abort();