MCPcopy Create free account
hub / github.com/NetSys/bess / Free

Method Free

core/memory.cc:368–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368void DmaMemoryPool::Free(void *ptr) {
369 // allow null pointers
370 if (!ptr) {
371 return;
372 }
373
374 const auto &it = alloced_.find(ptr);
375 CHECK(it != alloced_.end()) << "Unknown pointer " << ptr;
376 const size_t size = (*it).second;
377 AddRegion(reinterpret_cast<uintptr_t>(ptr), size);
378 alloced_.erase(it);
379 total_free_bytes_ += size;
380}
381
382std::string DmaMemoryPool::Dump() {
383 std::ostringstream out;

Callers

nothing calls this directly

Calls 1

endMethod · 0.45

Tested by

no test coverage detected