blob: 49dbc64a5158b713f1d2f7fdcae1611d3bd3d89b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// bump.h --- bump allocator -*- C -*-
//
// Copyright (c) 2026 Martin Michalec <martin@michalec.dev>
//
// SPDX-License-Identifier: MIT
//
// This file is part of COSMOS Codebase.
//
// Commentary:
//
// HOLD(cmmm): add direct bump API.
//
// Code:
#ifndef INCLUDED_COSMOS_BUMP_H
#define INCLUDED_COSMOS_BUMP_H
#include "buf.h"
struct bump {
struct buf buf; //!< Backing memory buffer.
};
#ifndef BUMP_NO_FEAT_GPA
#include "gpa.h"
void *gpa_fun_bump (void *ctx, void *ptr, usz old_sz, usz new_sz, usz align);
struct gpa gpa_from_bump (struct bump *);
#endif // BUMP_NO_FEAT_GPA
#endif // INCLUDED_COSMOS_BUMP_H
// bump.h ends here
|