Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ahMem.H File Reference

Aleph-w memory allocation helpers and instrumentation hooks. More...

#include <cstddef>
#include <cstdlib>
#include <ah-errors.H>
Include dependency graph for ahMem.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Functions

voidAleph::allocate (const std::size_t size)
 Allocate size bytes using the C heap.
 
voidAleph::allocate_zeroed (const std::size_t size)
 Allocate size zero-initialized bytes.
 
void Aleph::deallocate (void *ptr) noexcept
 Release memory previously obtained through Aleph allocation helpers.
 

Detailed Description

Aleph-w memory allocation helpers and instrumentation hooks.

This header centralizes Aleph's memory allocation conventions.

Overview

  • Currently, it is a lightweight wrapper around <cstddef> and <new>, enabling future expansion into custom allocators.

Usage

#include <ahMem.H>
void * ptr = Aleph::allocate(256);
Aleph-w memory allocation helpers and instrumentation hooks.
T * allocate(AhArenaAllocator &arena, Args &&... args)
Allocate and construct an object in an arena.
Definition ah-arena.H:478
void deallocate(AhArenaAllocator &arena, T *ptr) noexcept
Destruct and deallocate an object from an arena.
Definition ah-arena.H:494
Author
Leandro Rabindranath León

Definition in file ahMem.H.