| 34 | namespace bytedance::bolt::memory { |
| 35 | |
| 36 | Allocation::~Allocation() { |
| 37 | if (pool_ != nullptr) { |
| 38 | pool_->freeNonContiguous(*this); |
| 39 | } |
| 40 | // NOTE: exception throw on object destruction will cause process crash. |
| 41 | if ((numPages_ != 0) || !runs_.empty()) { |
| 42 | BOLT_FAIL("Bad Allocation state on destruction: {}", toString()); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void Allocation::append(uint8_t* address, MachinePageCount numPages) { |
| 47 | BOLT_CHECK( |
nothing calls this directly
no test coverage detected