|
Prism Ruby parser
|
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.
| 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.
| PRISM_EXPORTED_FUNCTION void pm_arena_free | ( | pm_arena_t * | arena | ) |
Frees both the held memory and the arena itself.
| arena | The arena to free. |