MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / ~DummyAllocator

Method ~DummyAllocator

src/core/test/mem_alloc.cpp:39–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 explicit DummyAllocator(size_t tot_size) : m_tot_size(tot_size) {}
38
39 ~DummyAllocator() {
40 auto run = [this]() { ASSERT_EQ(0u, m_addr2size.size()); };
41 run();
42 }
43
44 void* alloc(size_t size) override {
45 MGB_LOCK_GUARD(m_mtx);

Callers

nothing calls this directly

Calls 2

runFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected