MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / insert

Method insert

src/misc/alloc_tracker.cpp:107–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 void insert(void *key, const AllocInfo &info) {
108 if (!entries) init();
109 if ((filled + 1) * 4 >= capacity * 3) rehash(capacity * 2);
110 size_t i = find(key);
111 void *k = entries[i].key;
112 entries[i].key = key;
113 entries[i].info = info;
114 if (k == nullptr) { ++filled; ++live; }
115 else if (k == kTombstone) { ++live; }
116 }
117
118 void erase(void *key) {
119 if (!entries || !live) return;

Callers 15

TESTFunction · 0.45
TESTFunction · 0.45
MarkAsIgnoredMethod · 0.45
GetTestSuiteMethod · 0.45
AddArgumentMethod · 0.45
AddArgumentsMethod · 0.45
GTEST_LOCK_EXCLUDED_Function · 0.45
AddTestNameFunction · 0.45
RegisterTestsMethod · 0.45

Calls 2

initFunction · 0.50
findFunction · 0.50

Tested by 13

TESTFunction · 0.36
TESTFunction · 0.36
MarkAsIgnoredMethod · 0.36
GetTestSuiteMethod · 0.36
AddArgumentMethod · 0.36
AddArgumentsMethod · 0.36
GTEST_LOCK_EXCLUDED_Function · 0.36
AddTestNameFunction · 0.36
RegisterTestsMethod · 0.36