Extend class comment for UniqueStoreStringAllocator.
@@ -75,7 +75,14 @@ public:
/**
* Allocator for unique NUL-terminated strings that is accessed via a
- * 32-bit EntryRef.
+ * 32-bit EntryRef. Multiple buffer types are used. Small strings use
+ * a common buffer type handler with different parameters for array
+ * size (which denotes number of bytes set aside for meta data
+ * (reference count), string and NUL byte. Large strings use a
+ * different buffer type handler where buffer contains meta data
+ * (reference count) and an std::string, while the string value is on
+ * the heap. string_allocator::get_type_id() is used to map from
+ * string length to type id.
*/
template <typename RefT = EntryRefT<22> >
class UniqueStoreStringAllocator : public ICompactable
@@ -97,8 +104,7 @@ public:
EntryRef allocate(const char *value);
void hold(EntryRef ref);
EntryRef move(EntryRef ref) override;
- const UniqueStoreEntryBase& getWrapped(EntryRef ref) const
- {
+ const UniqueStoreEntryBase& getWrapped(EntryRef ref) const {
RefType iRef(ref);
auto &state = _store.getBufferState(iRef.bufferId());
auto type_id = state.getTypeId();
