add license to shell

This commit is contained in:
William Bell
2025-09-12 01:21:08 +01:00
parent 1a5abd9543
commit daa8056b7a
18 changed files with 3031 additions and 102 deletions

View File

@@ -8,10 +8,23 @@
#define ARGON_MEMORY_H
#include <stddef.h> // for size_t
#include <stdbool.h>
#include <gc/gc.h>
// GC-managed allocations
typedef enum allocation_status {
allocation_used,
allocation_soft_free, // avaiable for use, since it hasnt been freed but isnt in use.
allocation_fully_freed,
} allocation_status;
struct allocation {
void*ptr;
size_t size;
allocation_status status;
};
void ar_finalizer(void *obj, GC_finalization_proc fn, void *client_data,
GC_finalization_proc *old_fn, void **old_client_data);
void *ar_alloc(size_t size);
@@ -21,6 +34,7 @@ char *ar_strdup(const char *str);
// Memory init/shutdown
void ar_memory_init();
void ar_memory_shutdown();
void *checked_malloc(size_t size);