Prism Ruby parser
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
arena.hpp File Reference

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++.

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.