<commit_before>#ifndef SYNCOPE_HPP
#define SYNCOPE_HPP

#ifndef SYNCOPE_NUM_LOCKS
#   define SYNCOPE_NUM_LOCKS 0x100
#endif
#ifndef SYNCOPE_READ_SIDE_PARALLELISM
#   define SYNCOPE_READ_SIDE_PARALLELISM 0x8
#endif

#ifndef SYNCOPE_MAX_LAYERS
#   define SYNCOPE_MAX_LAYERS 100
#endif

#ifndef SYNCOPE_MAX_DEPTH
#   define SYNCOPE_MAX_DEPTH 0x10
#endif

#ifdef SYNCOPE_DETECT_DEADLOCKS
#include <iostream>
#include <string>
#include <exception>
#include <sstream>
#endif

#include <mutex>
#include <memory>
#include <algorithm>
#include <thread>
#include <atomic>
#include <cassert>

namespace syncope {

namespace detail {

    static const int CACHE_LINE_BITS = 6;

    class LockLayerImpl;

    struct TraceRoot {
        typedef std::tuple<LockLayerImpl*, const char*> Owner;
        Owner* owners;
        int top;

        TraceRoot() 
            : owners(new Owner[SYNCOPE_MAX_DEPTH])
            , top(0)
        {
        }

        ~TraceRoot() {
            delete[] owners;
        }
    };
<commit_msg>Replace raw pointer with unique_ptr<commit_after>#ifndef SYNCOPE_HPP
#define SYNCOPE_HPP

#ifndef SYNCOPE_NUM_LOCKS
#   define SYNCOPE_NUM_LOCKS 0x100
#endif
#ifndef SYNCOPE_READ_SIDE_PARALLELISM
#   define SYNCOPE_READ_SIDE_PARALLELISM 0x8
#endif

#ifndef SYNCOPE_MAX_LAYERS
#   define SYNCOPE_MAX_LAYERS 100
#endif

#ifndef SYNCOPE_MAX_DEPTH
#   define SYNCOPE_MAX_DEPTH 0x10
#endif

#ifdef SYNCOPE_DETECT_DEADLOCKS
#include <iostream>
#include <string>
#include <exception>
#include <sstream>
#endif

#include <mutex>
#include <memory>
#include <algorithm>
#include <thread>
#include <atomic>
#include <cassert>

namespace syncope {

namespace detail {

    static const int CACHE_LINE_BITS = 6;

    class LockLayerImpl;

    struct TraceRoot {
        typedef std::tuple<LockLayerImpl*, const char*> Owner;
        std::unique_ptr<Owner[]> owners;
        int top;

        TraceRoot() 
            : owners(new Owner[SYNCOPE_MAX_DEPTH])
            , top(0)
        {
        }
    };

{'fraction_non_alphanumeric': 0.08628428927680798, 'fraction_numerical': 0.013965087281795512, 'mean_word_length': 3.6114942528735634, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '1242284', 'n_tokens_mistral': 782, 'n_tokens_neox': 705, 'n_words': 161}