MCPcopy Create free account
hub / github.com/bytedance/bolt / ~Allocation

Method ~Allocation

bolt/common/memory/Allocation.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace bytedance::bolt::memory {
35
36Allocation::~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
46void Allocation::append(uint8_t* address, MachinePageCount numPages) {
47 BOLT_CHECK(

Callers

nothing calls this directly

Calls 3

toStringFunction · 0.50
freeNonContiguousMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected