Prism Ruby parser
Loading...
Searching...
No Matches
arena.h
Go to the documentation of this file.
1
6#ifndef PRISM_ARENA_H
7#define PRISM_ARENA_H
8
9#include "prism/compiler/exported.h"
10#include "prism/compiler/nodiscard.h"
11#include "prism/compiler/nonnull.h"
12
13#include <stddef.h>
14
18typedef struct pm_arena_t pm_arena_t;
19
28PRISM_EXPORTED_FUNCTION PRISM_NODISCARD pm_arena_t * pm_arena_new(void);
29
35PRISM_EXPORTED_FUNCTION void pm_arena_free(pm_arena_t *arena) PRISM_NONNULL(1);
36
37#endif
struct pm_arena_t pm_arena_t
An opaque pointer to an arena that is used for allocations.
Definition arena.h:18
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.