MCPcopy Create free account
hub / github.com/couchbase/fleece / allocTable

Method allocTable

Fleece/Support/StringTable.cc:200–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199
200 void StringTable::allocTable(size_t size) {
201 size_t hashesSize = size * sizeof(hash_t), entriesSize = size * sizeof(entry_t);
202 void *memory = ::malloc(hashesSize + entriesSize);
203 if (!memory)
204 throw std::bad_alloc();
205 initTable(size, (hash_t*)memory, (entry_t*)offsetby(memory, hashesSize));
206 _allocated = true;
207 }
208
209
210 __hot void StringTable::grow() {

Callers

nothing calls this directly

Calls 1

offsetbyFunction · 0.85

Tested by

no test coverage detected