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

Method Allocate

tensorflow/core/framework/ev_allocator.h:505–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503 }
504
505 void *Allocate(size_t num_bytes) {
506 auto it = t_bins_.find(num_bytes);
507 if (it != t_bins_.end()) {
508 return it->second->Allocate();
509 }
510 auto b = new ThreadLocalBin<ChunkType>(num_bytes, page_map_, arena_);
511 t_bins_.emplace(num_bytes, b);
512 return b->Allocate();
513 }
514
515 size_t BatchAllocate(size_t num, size_t num_bytes, void **ret) {
516 auto it = t_bins_.find(num_bytes);

Callers

nothing calls this directly

Calls 4

findMethod · 0.45
endMethod · 0.45
AllocateMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected