| 94 | } |
| 95 | |
| 96 | ContiguousAllocation::~ContiguousAllocation() { |
| 97 | if (pool_ != nullptr) { |
| 98 | pool_->freeContiguous(*this); |
| 99 | pool_ = nullptr; |
| 100 | } |
| 101 | // NOTE: exception throw on object destruction will cause process crash. |
| 102 | if ((data_ != nullptr) || (size_ != 0)) { |
| 103 | BOLT_FAIL("Bad ContiguousAllocation state on destruction: {}", toString()); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | void ContiguousAllocation::set(void* data, uint64_t size, uint64_t maxSize) { |
| 108 | data_ = data; |
nothing calls this directly
no test coverage detected