<commit_before>#pragma once
#ifndef _OP_VTM_STRINGMEMORYMANAGER__H_
#define _OP_VTM_STRINGMEMORYMANAGER__H_

#include <cstdint>
#include <type_traits>
#include <atomic>
#include <memory>
#include <future>
#include <fstream>
#include <op/trie/Containers.h>
#include <op/vtm/SegmentManager.h>
#include <op/vtm/FixedSizeMemoryManager.h>
#include <op/vtm/HeapManager.h>

namespace OP::vtm 
    {
        using namespace OP::utils;
        namespace smm
        {
            struct StringHead
            {
                using value_type = char;
                segment_pos_t _size = 0;
                value_type buffer[1];
            };

        }//ns:smm

        /**
        *  StringMemoryManager simplifies persistence of string in SegmentManagement 
        * structure. Internally it just use allocation with help of HeapManagerSlot so 
        * topology must specify this slot.
        * String management based on 3 methods #insert, #destroy and #get  
        */
        struct StringMemoryManager 
        {
            template <class TSegmentTopology>
            StringMemoryManager(TSegmentTopology& topology)
                : _segment_manager(topology.segment_manager())
                , _heap_mngr(topology.slot<HeapManagerSlot>())
            {
            }

            /**<commit_msg>Clang compatibility issue with template method<commit_after>#pragma once
#ifndef _OP_VTM_STRINGMEMORYMANAGER__H_
#define _OP_VTM_STRINGMEMORYMANAGER__H_

#include <cstdint>
#include <type_traits>
#include <atomic>
#include <memory>
#include <future>
#include <fstream>
#include <op/trie/Containers.h>
#include <op/vtm/SegmentManager.h>
#include <op/vtm/FixedSizeMemoryManager.h>
#include <op/vtm/HeapManager.h>

namespace OP::vtm 
    {
        using namespace OP::utils;
        namespace smm
        {
            struct StringHead
            {
                using value_type = char;
                segment_pos_t _size = 0;
                value_type buffer[1];
            };

        }//ns:smm

        /**
        *  StringMemoryManager simplifies persistence of string in SegmentManagement 
        * structure. Internally it just use allocation with help of HeapManagerSlot so 
        * topology must specify this slot.
        * String management based on 3 methods #insert, #destroy and #get  
        */
        struct StringMemoryManager 
        {
            template <class TSegmentTopology>
            StringMemoryManager(TSegmentTopology& topology)
                : _segment_manager(topology.segment_manager())
                , _heap_mngr(topology.template slot<HeapManagerSlot>())
            {
            }

            /**
{'fraction_non_alphanumeric': 0.08201655379984951, 'fraction_numerical': 0.002257336343115124, 'mean_word_length': 2.1997593261131168, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6417767', 'n_tokens_mistral': 778, 'n_tokens_neox': 745, 'n_words': 178}