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

Method createInternalCacheNodes

src/CppUTest/SimpleStringInternalCache.cpp:61–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61SimpleStringInternalCacheNode* SimpleStringInternalCache::createInternalCacheNodes()
62{
63 SimpleStringInternalCacheNode* node = (SimpleStringInternalCacheNode*) (void*) allocator_->alloc_memory(sizeof(SimpleStringInternalCacheNode) * amountOfInternalCacheNodes, __FILE__, __LINE__);
64
65 for (int i = 0; i < amountOfInternalCacheNodes; i++) {
66 node[i].freeMemoryHead_ = NULLPTR;
67 node[i].usedMemoryHead_ = NULLPTR;
68 }
69 node[0].size_ = 32;
70 node[1].size_ = 64;
71 node[2].size_ = 96;
72 node[3].size_ = 128;
73 node[4].size_ = 256;
74 return node;
75}
76
77bool SimpleStringInternalCache::isCached(size_t size)
78{

Callers

nothing calls this directly

Calls 1

alloc_memoryMethod · 0.45

Tested by

no test coverage detected