libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
src
util
configure.c
Go to the documentation of this file.
1
// Copyright (C) 2023 Ethan Uppal. All rights reserved.
2
3
#include <stdlib.h>
4
#include "
configure.h
"
5
#include "
util/arena.h
"
6
7
void
ps_teardown
(
void
) {
8
for
(
enum
ps_arena_domain
domain = 0; domain <
__PS_ARENA_COUNT
; domain++) {
9
ps_arena_close
(domain);
10
}
11
}
12
13
void
ps_configure
(
void
) {
14
atexit(
ps_teardown
);
15
}
ps_arena_close
void ps_arena_close(enum ps_arena_domain domain)
Destroys any allocated objects in the given arena.
Definition
arena.c:45
arena.h
Defines an arena allocator for the compiler.
ps_arena_domain
ps_arena_domain
Definition
arena.h:25
__PS_ARENA_COUNT
@ __PS_ARENA_COUNT
Definition
arena.h:25
ps_configure
void ps_configure(void)
Run at the start of your program.
Definition
configure.c:13
ps_teardown
void ps_teardown(void)
Definition
configure.c:7
configure.h
Generated by
1.9.8