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

Method Arena

tensorflow/core/lib/core/arena.cc:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// ----------------------------------------------------------------------
44
45Arena::Arena(const size_t block_size)
46 : remaining_(0),
47 block_size_(block_size),
48 freestart_(nullptr), // set for real in Reset()
49 blocks_alloced_(1),
50 overflow_blocks_(nullptr) {
51 assert(block_size > kDefaultAlignment);
52
53 first_blocks_[0].mem =
54 reinterpret_cast<char*>(port::AlignedMalloc(block_size_, sizeof(void*)));
55
56 first_blocks_[0].size = block_size_;
57
58 Reset();
59}
60
61Arena::~Arena() {
62 FreeBlocks();

Callers

nothing calls this directly

Calls 2

AlignedMallocFunction · 0.50
ResetFunction · 0.50

Tested by

no test coverage detected