infix
A JIT-Powered FFI Library for C
|
Unit tests for the internal arena allocator. More...
#include "common/double_tap.h"
#include "core/arena.c"
#include <infix/infix.h>
#include <stdint.h>
#include <string.h>
Macros | |
#define | infix_malloc malloc |
#define | infix_calloc calloc |
#define | infix_free free |
#define | infix_realloc realloc |
#define | DBLTAP_IMPLEMENTATION |
Functions | |
subtest ("Arena Allocator Core Functionality") | |
Variables | |
TEST | |
Unit tests for 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
This test validates the core functionality of the arena (bump) allocator in isolation. It verifies:
infix_arena_alloc
returns non-nullptr pointers for valid requests.infix_arena_alloc
are correctly aligned.infix_arena_calloc
returns zero-initialized memory.#define DBLTAP_IMPLEMENTATION |
#define infix_calloc calloc |
#define infix_free free |
#define infix_malloc malloc |
#define infix_realloc realloc |
subtest | ( | "Arena Allocator Core Functionality" | ) |