infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
arena.c File Reference

Implementation of the internal arena allocator. More...

#include "common/infix_internals.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for arena.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

infix_arena_tinfix_arena_create (size_t initial_size)
 Creates and initializes a new memory arena.
 
void infix_arena_destroy (infix_arena_t *arena)
 Frees an entire memory arena and all objects allocated within it.
 
void * infix_arena_alloc (infix_arena_t *arena, size_t size, size_t alignment)
 Allocates a block of memory from the arena with a specific alignment.
 
void * infix_arena_calloc (infix_arena_t *arena, size_t num, size_t size, size_t alignment)
 Allocates a zero-initialized block of memory from the arena.
 

Detailed Description

Implementation of the internal arena allocator.

Copyright (c) 2025 Sanko Robinson

This source code is dual-licensed under the Artistic License 2.0 or the MIT License. You may choose to use this code under the terms of either license.

SPDX-License-Identifier: (Artistic-2.0 OR MIT)

The documentation blocks within this file are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

SPDX-License-Identifier: CC-BY-4.0