12#ifndef ARCCORE_COMMON_DEFAULTMEMORYALLOCATOR_H
13#define ARCCORE_COMMON_DEFAULTMEMORYALLOCATOR_H
17#include "arccore/common/IMemoryAllocator.h"
36 friend class ArrayMetaData;
Information about an allocated memory region.
Memory allocator via malloc/realloc/free.
void deallocate(MemoryAllocationArgs, AllocatedMemoryInfo ptr) override
Frees the memory whose base address is ptr.
AllocatedMemoryInfo reallocate(MemoryAllocationArgs, AllocatedMemoryInfo current_ptr, Int64 new_size) override
Reallocates memory for new_size bytes and returns the pointer.
size_t guaranteedAlignment(MemoryAllocationArgs) const override
Value of the alignment guaranteed by the allocator.
Int64 adjustedCapacity(MemoryAllocationArgs, Int64 wanted_capacity, Int64 element_size) const override
Adjusts the capacity based on the element size.
eMemoryResource memoryResource() const override
Memory resource provided by the allocator.
AllocatedMemoryInfo allocate(MemoryAllocationArgs, Int64 new_size) override
Allocates memory for new_size bytes and returns the pointer.
bool hasRealloc(MemoryAllocationArgs) const override
Indicates whether the allocator supports realloc semantics.
Interface for a memory allocator.
virtual void deallocate(MemoryAllocationArgs args, AllocatedMemoryInfo ptr)=0
Frees the memory whose base address is ptr.
virtual AllocatedMemoryInfo allocate(MemoryAllocationArgs args, Int64 new_size)=0
Allocates memory for new_size bytes and returns the pointer.
virtual AllocatedMemoryInfo reallocate(MemoryAllocationArgs args, AllocatedMemoryInfo current_ptr, Int64 new_size)=0
Reallocates memory for new_size bytes and returns the pointer.
Class containing information to specialize allocations.
Memory allocator via malloc/realloc/free with listing output.
AllocatedMemoryInfo reallocate(MemoryAllocationArgs args, AllocatedMemoryInfo current_ptr, Int64 new_size) override
Reallocates memory for new_size bytes and returns the pointer.
void deallocate(MemoryAllocationArgs args, AllocatedMemoryInfo ptr) override
Frees the memory whose base address is ptr.
AllocatedMemoryInfo allocate(MemoryAllocationArgs args, Int64 new_size) override
Allocates memory for new_size bytes and returns the pointer.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
eMemoryResource
List of available memory resources.
@ Host
Allocates on the host.