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

Method Dump

core/memory.cc:382–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382std::string DmaMemoryPool::Dump() {
383 std::ostringstream out;
384 int i = 0;
385
386 out << "DmaMemoryPool at " << this << ": (" << alloced_.size()
387 << " alive objects)" << std::endl;
388
389 for (const auto &region : regions_) {
390 void *ptr = reinterpret_cast<void *>(region.addr);
391 out << utils::Format(" free segment %02d vaddr 0x%016" PRIxPTR
392 " paddr 0x%016" PRIxPTR " size 0x%08zx (%zu)",
393 i++, region.addr, Virt2Phy(ptr), region.size,
394 region.size)
395 << std::endl;
396 }
397
398 return out.str();
399}
400
401// Add a new region, and splice it with adjacent regions if necessary
402void DmaMemoryPool::AddRegion(uintptr_t addr, size_t size) {

Callers 1

TESTFunction · 0.45

Calls 3

FormatFunction · 0.85
Virt2PhyFunction · 0.85
sizeMethod · 0.80

Tested by 1

TESTFunction · 0.36