File: SequesteredAllocator.h

package info (click to toggle)
webkit2gtk 2.51.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 455,340 kB
  • sloc: cpp: 3,865,253; javascript: 197,710; ansic: 165,177; python: 49,241; asm: 21,868; ruby: 18,095; perl: 16,926; xml: 4,623; sh: 2,409; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 210
file content (595 lines) | stat: -rw-r--r-- 20,632 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
/*
 * Copyright (C) 2024-2025 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#pragma once

#include <wtf/Platform.h>

#if USE(PROTECTED_JIT)

#include <array>
#include <cstddef>
#include <cstdint>
#include <map>
#include <sys/mman.h>
#include <unistd.h>

#include <wtf/Assertions.h>
#include <wtf/Compiler.h>
#include <wtf/Lock.h>
#include <wtf/SequesteredImmortalHeap.h>
#include <wtf/StackTrace.h>
#include <wtf/StdLibExtras.h>
#include <wtf/StdMap.h>
#include <wtf/text/WTFString.h>

namespace WTF {

constexpr size_t minArenaGranuleSize { 16 * 16 * KB };
constexpr size_t sequesteredArenaAllocatorAlignment { 128 };

class alignas(sequesteredArenaAllocatorAlignment) SequesteredArenaAllocator {
private:
    using AllocationFailureMode = SequesteredImmortalHeap::AllocationFailureMode;

    constexpr static bool verbose { false };
    constexpr static bool trackAllocationDebugInfo { false };
    constexpr static bool eagerlyDecommit { false };
    constexpr static size_t pageSize { 16 * KB };

    class Arena {
        friend SequesteredArenaAllocator;
        constexpr static bool verbose { false };
        constexpr static bool canExpand { true };

    public:
        enum class TopGranulePolicy {
            Retain,
            DoNotRetain,
        };

        Arena() = default;

        Arena(Arena&& other) = delete;
        Arena& operator=(Arena&& other) = delete;
        Arena(const Arena&) = delete;
        Arena& operator=(const Arena&) = delete;

        void* allocate(size_t bytes)
        {
            auto retval = allocateImpl<AllocationFailureMode::Assert>(bytes);
            dataLogLnIf(verbose,
                "Allocator ", parent().id(),
                ": Arena ", parent().debugIndexOfArena(*this),
                ": allocated ", bytes, "B: alloc (", RawPointer(retval),
                "), allocHead (", RawPointer(reinterpret_cast<void*>(m_allocHead)),
                ")");
            return retval;
        }

        void* tryAllocate(size_t bytes)
        {
            auto retval = allocateImpl<AllocationFailureMode::ReturnNull>(bytes);
            dataLogLnIf(verbose && retval,
                "Allocator ", parent().id(),
                ": Arena ", parent().debugIndexOfArena(*this),
                ": allocated ", bytes, "B: alloc (", RawPointer(retval),
                "), allocHead (", RawPointer(reinterpret_cast<void*>(m_allocHead)),
                ")");
            return retval;
        }

        void* alignedAllocate(size_t alignment, size_t bytes)
        {
            auto retval = alignedAllocateImpl<AllocationFailureMode::Assert>(alignment, bytes);
            dataLogLnIf(verbose,
                "Allocator ", parent().id(),
                ": Arena ", parent().debugIndexOfArena(*this),
                ": align-allocated ", bytes, "B: alloc (", RawPointer(retval),
                "), allocHead (",
                RawPointer(reinterpret_cast<void*>(m_allocHead)),
                ")");
            return retval;
        }

        void* tryAlignedAllocate(size_t alignment, size_t bytes)
        {
            auto retval = alignedAllocateImpl<AllocationFailureMode::ReturnNull>(alignment, bytes);
            dataLogLnIf(verbose && retval,
                "Allocator ", parent().id(),
                ": Arena ", parent().debugIndexOfArena(*this),
                ": align-allocated ", bytes, "B: alloc (", RawPointer(retval),
                "), allocHead (",
                RawPointer(reinterpret_cast<void*>(m_allocHead)),
                ")");
            return retval;
        }

        void deallocate(void* /*p*/) { }

        GranuleList reset(TopGranulePolicy retain)
        {
            dataLogLnIf(verbose,
                "Allocator ", parent().id(), ": Arena ", parent.debugIndexOfArena(*this),
                ": ending lifetime: granule is (", currentGranule(),
                "), allocHead (", reinterpret_cast<void*>(m_allocHead),
                "), allocBound (", reinterpret_cast<void*>(m_allocBound)")");

            GranuleHeader* head { m_granules.head() };
            if (!head || retain == TopGranulePolicy::DoNotRetain) [[unlikely]] {
                if (!head) {
                    ASSERT(!m_allocHead);
                    ASSERT(!m_allocBound);
                }
                m_allocHead = 0;
                m_allocBound = 0;
                return WTFMove(m_granules);
            }

            GranuleList tail { m_granules.splitAt(1) };
            ASSERT(head == m_granules.head());
            setBoundsFromGranule(head);
            return tail;
        }

    private:
        static constexpr size_t minHeadAlignment = alignof(std::max_align_t);

        uintptr_t headIncrementedBy(size_t bytes) const
        {
            const size_t alignmentMask = minHeadAlignment - 1;
            return (m_allocHead + bytes + alignmentMask) & ~alignmentMask;
        }

        // FIXME: convert to headAlignedUpToAndIncrementedBy or similar
        uintptr_t headAlignedUpTo(size_t alignment) const
        {
            ASSERT(alignment);
            const size_t minHeadAlignmentMask = minHeadAlignment - 1;
            const size_t alignmentMask = (alignment - 1) | minHeadAlignmentMask;
            return (m_allocHead + alignmentMask) & ~alignmentMask;
        }

        template<AllocationFailureMode mode>
        void* allocateImpl(size_t bytes)
        {
            uintptr_t allocation = m_allocHead;
            uintptr_t newHead = headIncrementedBy(bytes);
            if (newHead < m_allocBound) [[likely]] {
                m_allocHead = newHead;
                return reinterpret_cast<void*>(allocation);
            }
            if constexpr (!canExpand) {
                if constexpr (mode == AllocationFailureMode::ReturnNull)
                    return nullptr;
                ASSERT(mode == AllocationFailureMode::Assert);
                RELEASE_ASSERT_NOT_REACHED();
            }
            return allocateImplSlowPath<mode>(bytes);
        }

        template <AllocationFailureMode mode>
        void* alignedAllocateImpl(size_t alignment, size_t bytes)
        {
            uintptr_t allocation = headAlignedUpTo(alignment);
            uintptr_t newHead = headIncrementedBy((allocation - m_allocHead) + bytes);
            if (newHead < m_allocBound) [[likely]] {
                m_allocHead = newHead;
                return reinterpret_cast<void*>(allocation);
            }
            if constexpr (!canExpand) {
                if constexpr (mode == AllocationFailureMode::ReturnNull)
                    return nullptr;
                ASSERT(mode == AllocationFailureMode::Assert);
                RELEASE_ASSERT_NOT_REACHED();
            }
            return alignedAllocateImplSlowPath<mode>(alignment, bytes);
        }

        template<AllocationFailureMode mode>
        NEVER_INLINE void* allocateImplSlowPath(size_t bytes)
        {
            addGranule<mode>(bytes);

            uintptr_t allocation = m_allocHead;
            m_allocHead = headIncrementedBy(bytes);
            ASSERT(m_allocHead <= m_allocBound);

            return reinterpret_cast<void*>(allocation);
        }

        template<AllocationFailureMode mode>
        NEVER_INLINE void* alignedAllocateImplSlowPath(size_t alignment, size_t bytes)
        {
            addGranule<mode>(bytes);

            uintptr_t allocation = headAlignedUpTo(alignment);
            m_allocHead = headIncrementedBy((allocation - m_allocHead) + bytes);
            ASSERT(m_allocHead <= m_allocBound);

            return reinterpret_cast<void*>(allocation);
        }

        template<AllocationFailureMode mode>
        GranuleHeader* addGranule([[maybe_unused]] size_t minSize)
        {
            ASSERT(minSize <= minArenaGranuleSize);
            GranuleHeader* granule = reinterpret_cast<GranuleHeader*>(mapGranule<mode>(minArenaGranuleSize));
            if constexpr (mode == AllocationFailureMode::ReturnNull) {
                if (!granule) [[unlikely]]
                    return nullptr;
            }

            m_granules.push(granule);
            setBoundsFromGranule(granule);

            static_assert(sizeof(GranuleHeader) >= minHeadAlignment);
            dataLogLnIf(verbose,
                "Allocator ", parent().id(),
                ": Arena ", parent().debugIndexOfArena(*this),
                ": expanded: granule was (", granule->prev(),
                "), now (", granule,
                "); allocHead (",
                RawPointer(reinterpret_cast<void*>(m_allocHead)),
                "), allocBound (",
                RawPointer(reinterpret_cast<void*>(m_allocBound)),
                ")");

            return granule;
        }

        void setBoundsFromGranule(GranuleHeader* granule)
        {
            static_assert(sizeof(GranuleHeader) >= minHeadAlignment);
            m_allocHead = reinterpret_cast<uintptr_t>(granule) + sizeof(GranuleHeader);
            m_allocBound = reinterpret_cast<uintptr_t>(granule) + (pageSize * (1 + granule->additionalPageCount));
        }

        template<AllocationFailureMode mode>
        void* mapGranule(size_t bytes)
        {
            return parent().mapGranule<mode>(bytes);
        }

        SequesteredArenaAllocator& parent()
        {
            return SequesteredArenaAllocator::allocatorForArena(*this);
        }

        GranuleHeader* currentGranule()
        {
            return m_granules.head();
        }

        GranuleList m_granules { };

        uintptr_t m_allocHead { 0 };
        uintptr_t m_allocBound { 0 };
    };
    friend Arena;
public:
    SequesteredArenaAllocator() = default;

    void* malloc(size_t bytes)
    {
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.allocate(bytes);
        registerSuccessfulAllocation(retval, bytes);
        return retval;
    }

    void* alignedMalloc(size_t alignment, size_t bytes)
    {
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.alignedAllocate(alignment, bytes);
        registerSuccessfulAllocation(retval, bytes);
        return retval;
    }

    void* zeroedMalloc(size_t bytes)
    {
        WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.allocate(bytes);
        std::memset(retval, 0, bytes);
        registerSuccessfulAllocation(retval, bytes);
        return retval;
        WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
    }

    void* tryMalloc(size_t bytes)
    {
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.tryAllocate(bytes);
        if (retval) [[likely]]
            registerSuccessfulAllocation(retval, bytes);
        return retval;
    }

    void* tryAlignedMalloc(size_t alignment, size_t bytes)
    {
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.tryAlignedAllocate(alignment, bytes);
        if (retval) [[likely]]
            registerSuccessfulAllocation(retval, bytes);
        return retval;
    }

    void* tryZeroedMalloc(size_t bytes)
    {
        WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
        ASSERT(m_alive);
        auto retval = m_genericSmallArena.tryAllocate(bytes);
        if (retval) [[likely]] {
            std::memset(retval, 0, bytes);
            registerSuccessfulAllocation(retval, bytes);
        }
        return retval;
        WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
    }

    void free(void* p)
    {
        ASSERT(m_alive);
        ASSERT(m_liveAllocations > 0);

        registerSuccessfulFree(p);

        return m_genericSmallArena.deallocate(p);
    }

    void alignedFree(void* p)
    {
        return free(p);
    }

    void* realloc(void* p, size_t newSize)
    {
        ASSERT(m_alive);
        ASSERT(m_liveAllocations > 0);

        void* newP = m_genericSmallArena.allocate(newSize);
        registerSuccessfulAllocation(newP, newSize);

        return reallocateInto(p, newP, newSize);
    }

    void* tryRealloc(void* p, size_t newSize)
    {
        ASSERT(m_alive);

        void* newP = m_genericSmallArena.tryAllocate(newSize);
        if (!newP)
            return newP;

        auto oldDebugKey = reinterpret_cast<uintptr_t>(p);
        auto newDebugKey = reinterpret_cast<uintptr_t>(newP);
        RELEASE_ASSERT(m_allocationInfos.count(oldDebugKey) > 0);
        m_allocationInfos[newDebugKey] = m_allocationInfos[oldDebugKey];

        return reallocateInto(p, newP, newSize);
    }

    // Since this is thread-local, we assume beginArenaLifetime and
    // endArenaLifetime cannot race
    void beginArenaLifetime()
    {
        ASSERT(!m_alive);
        m_alive = true;
        m_liveAllocations = 0;
        dataLogLnIf(verbose, "Allocator ", id(), " in thread ", Thread::currentSingleton(),
            ": starting lifetime");
    }

    void endArenaLifetime()
    {
        ASSERT(m_alive);
        if constexpr (trackAllocationDebugInfo) {
            if (m_liveAllocations > 0) {
                logLiveAllocationDebugInfos();
                CRASH();
            }
        } else
            RELEASE_ASSERT(!m_liveAllocations);
        m_alive = false;

        m_decommitQueue.concatenate(m_genericSmallArena.reset(Arena::TopGranulePolicy::Retain));
        if constexpr (!eagerlyDecommit)
            m_decommitQueue.decommit();

        dataLogLnIf(verbose, "Allocator ", id(), " in thread ",
            Thread::currentSingleton(), " ended lifetime: ", m_totalAllocatedBytes, "B allocated");

        if constexpr (verbose)
            m_totalAllocatedBytes = 0;
    }

    bool inArenaLifetime()
    {
        return m_alive;
    }

    int id()
    {
        return SequesteredImmortalHeap::instance().computeSlotIndex(this);
    }

    static SequesteredArenaAllocator* getCurrentAllocator()
    {
        using SelfT = SequesteredArenaAllocator;
        auto ptr = reinterpret_cast<SelfT*>(SequesteredImmortalHeap::instance().getSlot());
        if (!ptr) [[unlikely]] {
            static_assert(sizeof(SequesteredArenaAllocator) <= SequesteredImmortalHeap::slotSize);
            static_assert(!offsetof(SequesteredArenaAllocator, m_decommitQueue));
            ptr = reinterpret_cast<SelfT*>(
                SequesteredImmortalHeap::instance().allocateAndInstall<SelfT>());
        }
        ASSERT(ptr);
        return ptr;
    }
private:
    struct AllocationDebugInfo {
        size_t size;
        String stackTrace;
        String proximateFrame;
        bool live;
    };

    ALWAYS_INLINE void registerSuccessfulAllocation(void* p, size_t bytes) {
        m_liveAllocations++;
        if constexpr (verbose)
            m_totalAllocatedBytes += bytes;

        if constexpr (trackAllocationDebugInfo) {
            auto debugKey = reinterpret_cast<uintptr_t>(p);
            RELEASE_ASSERT(!m_allocationInfos.count(debugKey));

            auto fullTrace = StackTrace::captureStackTrace(1000, 3);
            auto localTrace = StackTrace::captureStackTrace(1, 1);
            AllocationDebugInfo info {
                .size = bytes,
                .stackTrace = fullTrace->toString(),
                .proximateFrame = localTrace->toString(),
                .live = true,
            };
            m_allocationInfos.emplace(std::make_pair(debugKey, info));
        }
    }

    void registerSuccessfulFree(void* p)
    {
        m_liveAllocations--;

        if constexpr (trackAllocationDebugInfo) {
            auto debugKey = reinterpret_cast<uintptr_t>(p);
            RELEASE_ASSERT(m_allocationInfos.count(debugKey) > 0);
            m_allocationInfos[debugKey].live = false;
            m_allocationInfos.erase(debugKey);
        }
    }

    void registerSuccessfulReallocation(void* from, void* to, size_t newSize)
    {
        if constexpr (trackAllocationDebugInfo) {
            auto oldDebugKey = reinterpret_cast<uintptr_t>(from);
            auto newDebugKey = reinterpret_cast<uintptr_t>(to);
            RELEASE_ASSERT(m_allocationInfos.count(oldDebugKey) > 0);
            m_allocationInfos[newDebugKey] = m_allocationInfos[oldDebugKey];
            m_allocationInfos[oldDebugKey].live = false;
            m_allocationInfos[newDebugKey].size = newSize;
        }
    }

    void logLiveAllocationDebugInfos();

    static SequesteredArenaAllocator& allocatorForArena(Arena& arena)
    {
        // This is legal since the existence of a valid Arena& implies the presence
        // of its parent allocator
        uintptr_t arenaInt = reinterpret_cast<uintptr_t>(&arena);
        uintptr_t allocatorInt = (arenaInt / sequesteredArenaAllocatorAlignment)
            * sequesteredArenaAllocatorAlignment;
        return *reinterpret_cast<SequesteredArenaAllocator*>(allocatorInt);
    }

    int debugIndexOfArena(Arena& arena)
    {
        // Only for use in debug/logging -- arenas should not otherwise
        // need to know about their "identity"
        uintptr_t target = reinterpret_cast<uintptr_t>(&arena);
        uintptr_t thisUintptr = reinterpret_cast<uintptr_t>(this);
        uintptr_t firstArena = thisUintptr
            + offsetof(SequesteredArenaAllocator, m_genericSmallArena);
        RELEASE_ASSERT(target >= firstArena && target <= (thisUintptr + sizeof(*this)));

        return (target - firstArena) / sizeof(arena);
    }

    template<AllocationFailureMode mode>
    void* mapGranule(size_t bytes)
    {
        return SequesteredImmortalHeap::instance().mapGranule<mode>(bytes);
    }

    void* reallocateInto(void* from, void* to, size_t toSize)
    {
        // FIXME: reimplement realloc properly, if necessary
        // Hopefully it will not be since it would require us to store the size
        uintptr_t fromInt = reinterpret_cast<uintptr_t>(from);
        uintptr_t nextPageAfterFrom = (fromInt + pageSize - 1) & ~(pageSize - 1);
        size_t maxSafeCopySize = nextPageAfterFrom - fromInt;

        WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
        size_t copySize = std::min(toSize, maxSafeCopySize);
        std::memcpy(to, from, copySize);
        free(from);
        return to;
        WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
    }

    ConcurrentDecommitQueue m_decommitQueue { };
    size_t m_liveAllocations { 0 };
    bool m_alive { false };

    // m_genericSmallArena must be the first Arena member of this class
    // in order for debugIndexOfArena to work
    Arena m_genericSmallArena { };

    // FIXME: wrap this in a child class so we can ifdef it out
    // when we don't need it
    StdMap<uintptr_t, AllocationDebugInfo> m_allocationInfos;
    size_t m_totalAllocatedBytes { 0 };
};

class ArenaLifetime {
public:
    ArenaLifetime()
        : m_slot(SequesteredArenaAllocator::getCurrentAllocator())
    {
        m_slot->beginArenaLifetime();
    }
    ~ArenaLifetime()
    {
        // Should not be created/destroyed in different threads
        ASSERT(SequesteredArenaAllocator::getCurrentAllocator() == m_slot);
        m_slot->endArenaLifetime();
    }
    ArenaLifetime(ArenaLifetime&& other) = delete;
    ArenaLifetime& operator=(ArenaLifetime&&) = delete;
    ArenaLifetime(const ArenaLifetime&) = delete;
    ArenaLifetime& operator=(const ArenaLifetime&) = delete;

    static bool isAlive()
    {
        return SequesteredArenaAllocator::getCurrentAllocator()->inArenaLifetime();
    }
private:
    SequesteredArenaAllocator* m_slot;
};

} // namespace WTF

using WTF::ArenaLifetime;

#endif // USE(PROTECTED_JIT)