#ifndef PARTITION_ALLOC_PARTITION_OOM_H_
#define PARTITION_ALLOC_PARTITION_OOM_H_
#include <cstddef>
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_base/compiler_specific.h"
#include "partition_alloc/partition_alloc_base/component_export.h"
namespace partition_alloc {
using OomFunction = void (*)(size_t);
namespace internal {
extern OomFunction g_oom_handling_function;
[[noreturn]] PA_NOINLINE PA_COMPONENT_EXPORT(
PARTITION_ALLOC) void PartitionExcessiveAllocationSize(size_t size);
#if !PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)
[[noreturn]] PA_NOINLINE void PartitionOutOfMemoryWithLotsOfUncommitedPages(
size_t size);
[[noreturn]] PA_NOINLINE void PartitionOutOfMemoryWithLargeVirtualSize(
size_t virtual_size);
#endif
}
}
#endif