IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::AllocRequest Struct Reference

A data type containing size and alignment information for a single allocation. More...

#include <ice/mem.hxx>

Public Member Functions

constexpr AllocRequest () noexcept=default
constexpr AllocRequest (ice::usize size, ice::ualign alignment=ice::ualign::b_default) noexcept
 Initializes the structure with size and an optional alignment value.
constexpr AllocRequest (ice::meminfo memory_info) noexcept
 Initializes the structure from a meminfo value.
template<typename T>
requires (std::is_pointer_v<T> == false)
constexpr AllocRequest (ice::AlignResult< T > align_result) noexcept
 Initializes the structure from an alignment operation result. See ice::align_to for additional info.

Public Attributes

ice::usize size = 0_B
 Number of bytes to allocate.
ice::ualign alignment = ice::ualign::b_default
 Alignment requested for this allocation.

Detailed Description

A data type containing size and alignment information for a single allocation.

The allocation will always be at least as big as the requested alignment value.

Constructor & Destructor Documentation

◆ AllocRequest() [1/4]

ice::AllocRequest::AllocRequest ( )
constexprdefaultnoexcept

◆ AllocRequest() [2/4]

ice::AllocRequest::AllocRequest ( ice::usize size,
ice::ualign alignment = ice::ualign::b_default )
constexprnoexcept

Initializes the structure with size and an optional alignment value.

◆ AllocRequest() [3/4]

ice::AllocRequest::AllocRequest ( ice::meminfo memory_info)
constexprnoexcept

Initializes the structure from a meminfo value.

◆ AllocRequest() [4/4]

template<typename T>
requires (std::is_pointer_v<T> == false)
ice::AllocRequest::AllocRequest ( ice::AlignResult< T > align_result)
constexprnoexcept

Initializes the structure from an alignment operation result. See ice::align_to for additional info.

Member Data Documentation

◆ alignment

ice::ualign ice::AllocRequest::alignment = ice::ualign::b_default

Alignment requested for this allocation.

The default alignment might be different on different platforms.

◆ size

ice::usize ice::AllocRequest::size = 0_B

Number of bytes to allocate.


The documentation for this struct was generated from the following file: