Ruby 4.1.0dev (2026-10-21 revision 536dc6f98b72e6999a84bb6373562c43cb1ddf8a)
Data Structures | Typedefs | Functions
arena.hpp File Reference

(536dc6f98b72e6999a84bb6373562c43cb1ddf8a)

Ownership of arenas from C++. More...

#include "prism/compiler/cplusplus.hpp"
#include "prism/arena.h"
#include <memory>
Include dependency graph for arena.hpp:

Go to the source code of this file.

Data Structures

struct  prism::arena_deleter
 Frees an arena with pm_arena_free. More...
 

Typedefs

using prism::unique_arena = std::unique_ptr< pm_arena_t, arena_deleter >
 An owned arena.
 

Functions

unique_arena prism::make_arena () noexcept
 Allocate a new arena.
 

Detailed Description

Ownership of arenas from C++.

Definition in file arena.hpp.

Typedef Documentation

◆ unique_arena

using prism::unique_arena = typedef std::unique_ptr<pm_arena_t, arena_deleter>

An owned arena.

Definition at line 28 of file arena.hpp.

Function Documentation

◆ make_arena()

unique_arena prism::make_arena ( )
inlinenoexcept

Allocate a new arena.

Allocation failure aborts, so this never throws.

Returns
A unique_arena managing the newly allocated arena.

Definition at line 36 of file arena.hpp.

Referenced by prism::make_arena().