1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 18:54:57 +00:00
serenity/Userland/Libraries/LibJS/Heap
Andreas Kling 4bbb0a5c35 LibJS: Add ConservativeVector<T>
This works very similarly to MarkedVector<T>, but instead of expecting
T to be Value or a GC-allocated pointer type, T can be anything.
Every pointer-sized value in the vector's storage will be checked during
conservative root scanning.

In other words, this allows you to put something like this in a
ConservativeVector<Foo> and it will be protected from GC:

    struct Foo {
        i64 number;
        Value some_value;
        GCPtr<Object> some_object;
    };
2024-02-22 16:44:54 +01:00
..
BlockAllocator.cpp LibJS: Don't use MADV_FREE / MADV_DONTNEED on GNU/Hurd 2024-01-14 14:56:33 -07:00
BlockAllocator.h LibJS: Never give back virtual memory once it belongs to a cell type 2023-12-31 15:35:56 +01:00
Cell.cpp LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Cell.h Userland: Make bit-fields compatible with MSVC C++ ABI 2023-12-07 10:28:19 -07:00
CellAllocator.cpp LibJS: Show class in SerenityOS mmap name for type-specific allocators 2023-12-31 15:35:56 +01:00
CellAllocator.h LibJS: Show class in SerenityOS mmap name for type-specific allocators 2023-12-31 15:35:56 +01:00
ConservativeVector.cpp LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00
ConservativeVector.h LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00
DeferGC.h LibJS: Make GC deferral friendship based 2023-09-25 13:19:25 +02:00
GCPtr.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
Handle.cpp LibJS: Add source location for Handle nodes in GC graph dumper output 2023-09-24 14:55:32 +02:00
Handle.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
Heap.cpp LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00
Heap.h LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00
HeapBlock.cpp LibJS: Show class in SerenityOS mmap name for type-specific allocators 2023-12-31 15:35:56 +01:00
HeapBlock.h LibJS: Show class in SerenityOS mmap name for type-specific allocators 2023-12-31 15:35:56 +01:00
HeapFunction.h LibJS: Allow JS::create_heap_function to accept a lambda 2024-01-27 21:40:25 -05:00
HeapRoot.h LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00
Internals.h LibJS: Lower HeapBlock size to 4 KiB 2023-11-19 12:10:31 +01:00
MarkedVector.cpp LibJS: Let MarkedVector<T> inherit from Vector and handle Cell* + Value 2022-02-09 12:25:27 +00:00
MarkedVector.h LibJS: Add source location for Handle nodes in GC graph dumper output 2023-09-24 14:55:32 +02:00