mirror of
https://codeberg.org/andyscott/marCsweep.git
synced 2024-12-22 09:43:12 -05:00
19 lines
346 B
C
19 lines
346 B
C
#ifndef GC_ALLOC_H
|
|
#define GC_ALLOC_H
|
|
|
|
#include <stdio.h>
|
|
|
|
// Metadata for allocated memory
|
|
struct gc_block_header {
|
|
size_t size;
|
|
int free;
|
|
struct gc_block_header *next;
|
|
};
|
|
|
|
// Performs allocations of SIZE bytes
|
|
void *gc_malloc(size_t size);
|
|
|
|
// Frees blocks of memory allocated by 'gc_alloc'
|
|
void gc_free(void *ptr);
|
|
|
|
#endif /* GC_ALLOC_H */
|