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

Method AllocatedSize

tensorflow/core/framework/tracking_allocator.cc:213–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213size_t TrackingAllocator::AllocatedSize(const void* ptr) const {
214 if (track_sizes_locally_) {
215 mutex_lock lock(mu_);
216 auto it = in_use_.find(ptr);
217 if (it != in_use_.end()) {
218 return (*it).second.allocated_size;
219 }
220 return 0;
221 } else {
222 return allocator_->AllocatedSize(ptr);
223 }
224}
225
226int64 TrackingAllocator::AllocationId(const void* ptr) const {
227 if (track_sizes_locally_) {

Callers 4

AllocateRawMethod · 0.45
BatchAllocateRawMethod · 0.45
DeallocateRawMethod · 0.45
DeallocateRawAsyncMethod · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected