| 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() { |
nothing calls this directly
no test coverage detected