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

Method find

src/misc/alloc_tracker.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 size_t find(void *key) const {
78 size_t mask = capacity - 1;
79 size_t i = mix(key) & mask;
80 size_t first_tomb = SIZE_MAX;
81 while (true) {
82 void *k = entries[i].key;
83 if (k == nullptr) return (first_tomb != SIZE_MAX) ? first_tomb : i;
84 if (k == key) return i;
85 if (k == kTombstone && first_tomb == SIZE_MAX) first_tomb = i;
86 i = (i + 1) & mask;
87 }
88 }
89
90 void rehash(size_t new_cap) {
91 Entry *old_entries = entries;

Callers 7

lexer_track_freeFunction · 0.45
inscribeInsanePointerFunction · 0.45
freeInsanePointerFunction · 0.45
freeMethod · 0.45
reallocateMethod · 0.45
track_free_hookFunction · 0.45
das_table_findFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected