#ifndef V8_HEAP_CPPGC_OBJECT_ALLOCATOR_H_
#define V8_HEAP_CPPGC_OBJECT_ALLOCATOR_H_
#include <optional>
#include "include/cppgc/allocation.h"
#include "include/cppgc/internal/gc-info.h"
#include "include/cppgc/macros.h"
#include "src/base/logging.h"
#include "src/heap/cppgc/globals.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/heap-page.h"
#include "src/heap/cppgc/heap-space.h"
#include "src/heap/cppgc/memory.h"
#include "src/heap/cppgc/object-start-bitmap.h"
#include "src/heap/cppgc/raw-heap.h"
namespace cppgc {
namespace internal {
class ObjectAllocator;
class PreFinalizerHandler;
}
class V8_EXPORT AllocationHandle { … };
namespace internal {
class StatsCollector;
class PageBackend;
class GarbageCollector;
class V8_EXPORT_PRIVATE ObjectAllocator final : public cppgc::AllocationHandle { … };
void* ObjectAllocator::AllocateObject(size_t size, GCInfoIndex gcinfo) { … }
void* ObjectAllocator::AllocateObject(size_t size, AlignVal alignment,
GCInfoIndex gcinfo) { … }
void* ObjectAllocator::AllocateObject(size_t size, GCInfoIndex gcinfo,
CustomSpaceIndex space_index) { … }
void* ObjectAllocator::AllocateObject(size_t size, AlignVal alignment,
GCInfoIndex gcinfo,
CustomSpaceIndex space_index) { … }
RawHeap::RegularSpaceType ObjectAllocator::GetInitialSpaceIndexForSize(
size_t size) { … }
void* ObjectAllocator::OutOfLineAllocate(NormalPageSpace& space, size_t size,
AlignVal alignment,
GCInfoIndex gcinfo) { … }
void* ObjectAllocator::AllocateObjectOnSpace(NormalPageSpace& space,
size_t size, AlignVal alignment,
GCInfoIndex gcinfo) { … }
void* ObjectAllocator::AllocateObjectOnSpace(NormalPageSpace& space,
size_t size, GCInfoIndex gcinfo) { … }
}
}
#endif