18#if defined(CPPGC_CAGED_HEAP)
30 if (!page_allocator) {
32 default_page_allocator;
33 page_allocator = default_page_allocator.
get();
35#if defined(LEAK_SANITIZER)
40 page_allocator = lsan_page_allocator.get();
42 return *page_allocator;
58 (*custom_handler_)(reason, loc,
heap_);
59 FATAL(
"Custom out of memory handler should not have returned");
63 "Oilpan: Out of memory (%s)", reason.c_str());
80 return *g_page_allocator;
87 return tracing_controller.
get();
93 size_t desired_heap_size) {
94#if defined(V8_USE_ADDRESS_SANITIZER) && defined(V8_HOST_ARCH_64_BIT)
99 __asan_get_shadow_mapping(&shadow_scale,
nullptr);
101 const size_t poisoning_granularity = 1 << shadow_scale;
105 auto& allocator = internal::CreateAllocatorIfNeeded(page_allocator);
107 CHECK(!internal::g_page_allocator);
109#if defined(CPPGC_CAGED_HEAP)
112 internal::g_page_allocator = &allocator;
void V8_Fatal(const char *format,...)
static void InitializeIfNeeded(PageAllocator &platform_allocator, size_t desired_heap_size)
Callback * custom_handler_
void SetCustomHandler(Callback *)
void operator()(const std::string &reason=std::string(), const SourceLocation &=SourceLocation::Current()) const
void(const std::string &, const SourceLocation &, HeapBase *) Callback
static void Initialize(PageAllocator &page_allocator)
constexpr size_t Line() const
constexpr const char * FileName() const
void Fatal(const std::string &reason, const SourceLocation &loc)
PageAllocator & GetGlobalPageAllocator()
constexpr size_t kAllocationGranularity
FatalOutOfMemoryHandler & GetGlobalOOMHandler()
v8::PageAllocator PageAllocator
void InitializeProcess(PageAllocator *page_allocator, size_t desired_heap_size)
#define CHECK_NOT_NULL(val)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)