kiba-engine
Functions
system.h File Reference

Function signatures for system allocator implementation. More...

#include <kiba/allocators/allocator.h>
Include dependency graph for system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

KB_LOCAL b8 system_allocator_create (allocator *alloc, usize size)
 
KB_LOCAL void system_allocator_destroy (allocator *alloc)
 
KB_LOCAL void * system_allocator_allocate (allocator *alloc, usize size)
 
KB_LOCAL void system_allocator_free (allocator *alloc, void *mem, usize size)
 
KB_LOCAL void system_allocator_free_all (allocator *alloc)
 

Detailed Description

Function signatures for system allocator implementation.

Only used for unit tests to avoid issues related to a specific allocator implementation. All functionality will simply forward to the stdlib.

Definition in file system.h.

Function Documentation

◆ system_allocator_allocate()

KB_LOCAL void* system_allocator_allocate ( allocator alloc,
usize  size 
)
See also
allocator_impl_allocate_fn

Definition at line 24 of file system.c.

Here is the call graph for this function:

◆ system_allocator_create()

KB_LOCAL b8 system_allocator_create ( allocator alloc,
usize  size 
)
See also
allocator_impl_create_fn

Definition at line 10 of file system.c.

Here is the call graph for this function:

◆ system_allocator_destroy()

KB_LOCAL void system_allocator_destroy ( allocator alloc)
See also
allocator_impl_destroy_fn

Definition at line 22 of file system.c.

◆ system_allocator_free()

KB_LOCAL void system_allocator_free ( allocator alloc,
void *  mem,
usize  size 
)
See also
allocator_impl_free_fn

Definition at line 29 of file system.c.

Here is the call graph for this function:

◆ system_allocator_free_all()

KB_LOCAL void system_allocator_free_all ( allocator alloc)
See also
allocator_impl_free_all_fn

Definition at line 35 of file system.c.