MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ~BFCAllocator

Method ~BFCAllocator

tensorflow/core/common_runtime/bfc_allocator.cc:73–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73BFCAllocator::~BFCAllocator() {
74 // Return memory back.
75 VLOG(2) << "Number of regions allocated: "
76 << region_manager_.regions().size();
77 for (const auto& region : region_manager_.regions()) {
78 sub_allocator_->Free(region.ptr(), region.memory_size());
79 }
80
81 for (BinNum b = 0; b < kNumBins; b++) {
82 BinFromIndex(b)->~Bin();
83 }
84}
85
86BFCAllocator::Chunk* BFCAllocator::ChunkFromHandle(ChunkHandle h) {
87 DCHECK_GE(h, 0);

Callers

nothing calls this directly

Calls 5

memory_sizeMethod · 0.80
sizeMethod · 0.45
FreeMethod · 0.45
ptrMethod · 0.45
~BinMethod · 0.45

Tested by

no test coverage detected