infix
A JIT-Powered FFI Library for C
|
A stress test for detecting memory leaks in the infix FFI library. More...
Classes | |
struct | StressObject |
Macros | |
#define | DBLTAP_IMPLEMENTATION |
#define | STRESS_ITERATIONS 5000 |
Functions | |
void | dummy_stress_func_fwd (StressObject obj) |
void | dummy_stress_handler_rev (StressObject obj) |
subtest ("Memory leak stress test (happy path)") | |
Variables | |
TEST | |
A stress test for detecting memory leaks in the infix FFI library.
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 is designed to be run under a memory analysis tool like Valgrind or AddressSanitizer. Its purpose is not to verify functional correctness, but to expose memory leaks by performing a large number of allocations and deallocations of all major dynamic FFI objects.
In a tight loop, the test performs the following cycle:
infix_type
graph within the arena.The test is considered successful if it completes without crashing and the memory analysis tool reports ZERO memory leaks.
#define DBLTAP_IMPLEMENTATION |
#define STRESS_ITERATIONS 5000 |
void dummy_stress_func_fwd | ( | StressObject | obj | ) |
void dummy_stress_handler_rev | ( | StressObject | obj | ) |
subtest | ( | "Memory leak stress test (happy path)" | ) |