This commit is contained in:
2026-01-16 03:20:38 -08:00
parent e0d8693840
commit 94d5749d31
19 changed files with 1358 additions and 3 deletions

23
src/gc.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef INCLUDED_GC_H
#define INCLUDED_GC_H
#include <stddef.h>
typedef struct GCEntry {
void *obj;
struct GCEntry *prev;
struct GCEntry *next;
} GCEntry;
typedef struct {
unsigned int immortal : 1;
unsigned int mark : 1;
GCEntry *entry;
} ObjectGCInfo;
// the argument is a LispVal *
void lisp_gc_register_object(void *obj);
size_t lisp_gc_now(void);
#endif