MCPcopy Create free account
hub / github.com/cpputest/cpputest / createNewAccountantAllocationNode

Method createNewAccountantAllocationNode

src/CppUTest/TestMemoryAllocator.cpp:407–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405};
406
407MemoryAccountantAllocationNode* MemoryAccountant::createNewAccountantAllocationNode(size_t size, MemoryAccountantAllocationNode* next) const
408{
409 MemoryAccountantAllocationNode* node = (MemoryAccountantAllocationNode*) (void*) allocator_->alloc_memory(sizeof(MemoryAccountantAllocationNode), __FILE__, __LINE__);
410 node->size_ = size;
411 node->allocations_ = 0;
412 node->deallocations_ = 0;
413 node->maxAllocations_ = 0;
414 node->currentAllocations_ = 0;
415 node->next_ = next;
416 return node;
417}
418
419void MemoryAccountant::destroyAccountantAllocationNode(MemoryAccountantAllocationNode* node) const
420{

Callers

nothing calls this directly

Calls 1

alloc_memoryMethod · 0.45

Tested by

no test coverage detected