12#ifndef ARCCORE_COMMON_INTERNAL_MEMORYPOOL_H
13#define ARCCORE_COMMON_INTERNAL_MEMORYPOOL_H
17#include "arccore/common/IMemoryPool.h"
65class ARCCORE_COMMON_EXPORT MemoryPool
74 ~MemoryPool()
override;
78 MemoryPool(
const MemoryPool&) =
delete;
79 MemoryPool(MemoryPool&&) =
delete;
80 MemoryPool& operator=(
const MemoryPool&) =
delete;
81 MemoryPool& operator=(MemoryPool&&) =
delete;
87 void dumpStats(std::ostream& ostr);
88 void dumpFreeMap(std::ostream& ostr);
101 std::unique_ptr<Impl> m_p;
Interface of a memory pool.
Interface for an allocator for a MemoryPool.
virtual void freeMemory(void *address, Int64 size)=0
Frees the block located at address address containing size bytes.
virtual void * allocateMemory(Int64 size)=0
Allocates a block for size bytes.
void setMaxCachedBlockSize(Int32 v) override
Implementation of IMemoryPool.
void freeMemory(void *ptr, Int64 size) override
Frees the block located at address address containing size bytes.
void * allocateMemory(Int64 size) override
Allocates a block for size bytes.
Int64 totalAllocated() const override
Total size (in bytes) allocated in the memory pool.
void freeCachedMemory() override
Frees the memory in the cache.
Int64 totalCached() const override
Total size (in bytes) in the cache.
Unicode character string.
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.