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

Method FreeAll

tensorflow/lite/experimental/ruy/allocator.h:83–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 void FreeAll() {
84 current_ = 0;
85 if (fallback_blocks_.empty()) {
86 return;
87 }
88
89 std::size_t new_size = round_up_pot(size_ + fallback_blocks_total_size_);
90 SystemAlignedFree(ptr_);
91 ptr_ = SystemAlignedAlloc(new_size);
92 size_ = new_size;
93
94 for (void* p : fallback_blocks_) {
95 SystemAlignedFree(p);
96 }
97 fallback_blocks_.clear();
98 fallback_blocks_total_size_ = 0;
99 }
100
101 private:
102 void* AllocateFast(std::size_t num_bytes) {

Callers

nothing calls this directly

Calls 3

round_up_potFunction · 0.85
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected