rename allocator to cig

This commit is contained in:
2025-10-11 03:31:23 +02:00
parent 20cac1737e
commit c240443828
8 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
// the test files are compiled together.
#define ALLOCATOR_IMPLEMENTATION
#include "allocator.h"
#include "cig.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#include "allocator.h"
#include "cig.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "allocator.h"
#include "cig.h"
void *buffer_allocator_alloc(buffer_allocator_t *this, size_t bytes) {
size_t new_size = this->size + bytes;
View File
+1 -1
View File
@@ -1,4 +1,4 @@
#include "allocator.h"
#include "cig.h"
static void *stdlib_alloc(void *this, size_t bytes, const char *file, int line) {
(void)this;
+1 -3
View File
@@ -1,5 +1,5 @@
#include <criterion/criterion.h>
#include "allocator.h"
#include "cig.h"
#define EXPECT 5
Test(borrow_allocator, test) {
@@ -11,8 +11,6 @@ Test(borrow_allocator, test) {
borrow_allocator_reset(&balloc);
cr_assert_eq(0, borrow_allocator_count_allocations(&balloc));
borrow_allocator_assert_all_freed(&balloc);
void *foobar = malloc(1000);
(void)foobar;
}
#define IS_SIZE 900
+1 -1
View File
@@ -1,5 +1,5 @@
#include <criterion/criterion.h>
#include "allocator.h"
#include "cig.h"
static void test_buffer_alloc(buffer_allocator_t impl) {
allocator_t inter = buffer_allocator_interface(&impl);
+1 -1
View File
@@ -1,5 +1,5 @@
#include <criterion/criterion.h>
#include "allocator.h"
#include "cig.h"
Test(std_allocator, test) {