| 248 | } |
| 249 | |
| 250 | void StringHeapAllocator::recognize ( char * str ) { |
| 251 | if ( !str ) return; |
| 252 | uint32_t length = uint32_t(strlen(str)); |
| 253 | uint64_t size = uint64_t(length) + 1; |
| 254 | size = (size + 15) & ~15; |
| 255 | if ( needIntern && isOwnPtr(str, size) ) { |
| 256 | internMap.insert(StrHashEntry(str,length)); |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | char * ConstStringAllocator::intern(const char * str, uint64_t length) const { |
| 261 | DAS_ASSERTF(length <= UINT32_MAX, "intern requires length < 4GB, got %llu", (unsigned long long)length); |
no test coverage detected