13#ifndef ARCANE_IMPL_MEMORYBUFFER_H
14#define ARCANE_IMPL_MEMORYBUFFER_H
18#include "arcane/utils/Array.h"
19#include "arcane/utils/Ref.h"
34class ARCANE_UTILS_EXPORT MemoryBuffer
52 auto* memory =
new MemoryBuffer(allocator);
67 Span<std::byte> bytes() {
return m_buffer; }
68 IMemoryAllocator* allocator()
const {
return m_buffer.allocator(); }
Interface for a memory allocator.
void resize(Int64 new_size)
Resizes the memory area.
UniqueArray< std::byte > m_buffer
Buffer containing the data.
static Ref< MemoryBuffer > create(IMemoryAllocator *allocator)
Creates an instance of MemoryBuffer.
Reference to an instance.
View of an array of elements of type T.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.