chromium/third_party/pdfium/core/fxcrt/fx_memory_pa.cpp

// Copyright 2022 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "core/fxcrt/fx_memory.h"

#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/fx_safe_types.h"

#if defined(PDF_USE_PARTITION_ALLOC)
#include "partition_alloc/partition_alloc.h"
#else
#error "File compiled under wrong build option."
#endif

namespace {

constexpr partition_alloc::PartitionOptions kOptions =;

struct Allocators {};

Allocators* g_allocators =;

#ifndef V8_ENABLE_SANDBOX
partition_alloc::PartitionAllocator& GetArrayBufferPartitionAllocator() {}
#endif

partition_alloc::PartitionAllocator& GetGeneralPartitionAllocator() {}

partition_alloc::PartitionAllocator& GetStringPartitionAllocator() {}

}  // namespace

namespace pdfium::internal {

void* Alloc(size_t num_members, size_t member_size) {}

void* Calloc(size_t num_members, size_t member_size) {}

void* Realloc(void* ptr, size_t num_members, size_t member_size) {}

void Dealloc(void* ptr) {}

void* StringAlloc(size_t num_members, size_t member_size) {}

void StringDealloc(void* ptr) {}

}  // namespace pdfium::internal

void FX_InitializeMemoryAllocators() {}

void FX_DestroyMemoryAllocators() {}

#ifndef V8_ENABLE_SANDBOX
void* FX_ArrayBufferAllocate(size_t length) {}

void* FX_ArrayBufferAllocateUninitialized(size_t length) {}

void FX_ArrayBufferFree(void* data) {}
#endif  // V8_ENABLE_SANDBOX