|
Ruby 4.1.0dev (2026-03-22 revision 251fd7a11e442c34c1b60908409e5611f69ef858)
|
A bump allocator for the prism parser. More...
#include "prism/compiler/exported.h"#include "prism/compiler/nodiscard.h"#include "prism/compiler/nonnull.h"#include <stddef.h>

Go to the source code of this file.
Typedefs | |
| typedef struct pm_arena_t | pm_arena_t |
| An opaque pointer to an arena that is used for allocations. | |
Functions | |
| PRISM_EXPORTED_FUNCTION PRISM_NODISCARD pm_arena_t * | pm_arena_new (void) |
| Returns a newly allocated and initialized arena. | |
| PRISM_EXPORTED_FUNCTION void | pm_arena_free (pm_arena_t *arena) PRISM_NONNULL(1) |
| Frees both the held memory and the arena itself. | |
A bump allocator for the prism parser.
Definition in file arena.h.
| typedef struct pm_arena_t pm_arena_t |
| PRISM_EXPORTED_FUNCTION void pm_arena_free | ( | pm_arena_t * | arena | ) |
| PRISM_EXPORTED_FUNCTION PRISM_NODISCARD pm_arena_t * pm_arena_new | ( | void | ) |
Returns a newly allocated and initialized arena.
If the arena cannot be allocated, this function aborts the process.