diff --git a/c/dtypes.h b/c/dtypes.h index f8e4c65..9e94d39 100644 --- a/c/dtypes.h +++ b/c/dtypes.h @@ -87,18 +87,9 @@ #error "unknown platform" #endif -#ifdef BOEHM_GC -// boehm GC allocator -#include -#define LLT_ALLOC(n) GC_MALLOC(n) -#define LLT_REALLOC(p, n) GC_REALLOC((p), (n)) -#define LLT_FREE(x) ((void)(x)) -#else -// standard allocator #define LLT_ALLOC(n) malloc(n) #define LLT_REALLOC(p, n) realloc((p), (n)) #define LLT_FREE(x) free(x) -#endif typedef int bool_t; diff --git a/c/flisp.c b/c/flisp.c index d9b4f86..93b5ff6 100644 --- a/c/flisp.c +++ b/c/flisp.c @@ -2587,13 +2587,7 @@ value_t fl_toplevel_eval(value_t expr) return fl_applyn(1, symbol_value(evalsym), expr); } -void fl_init(size_t initial_heapsize) -{ -#ifdef BOEHM_GC - GC_init(); -#endif - lisp_init(initial_heapsize); -} +void fl_init(size_t initial_heapsize) { lisp_init(initial_heapsize); } int fl_load_system_image(value_t sys_image_iostream) { diff --git a/c/iostream.c b/c/iostream.c index 101ecb9..78cf4f9 100644 --- a/c/iostream.c +++ b/c/iostream.c @@ -376,9 +376,7 @@ value_t fl_ioreaduntil(value_t *args, u_int32_t nargs) if (dest.buf != data) { // outgrew initial space cv->data = dest.buf; -#ifndef BOEHM_GC cv_autorelease(cv); -#endif } ((char *)cv->data)[n] = '\0'; if (n == 0 && ios_eof(src)) @@ -423,9 +421,7 @@ value_t stream_to_string(value_t *ps) n--; b[n] = '\0'; str = cvalue_from_ref(stringtype, b, n, FL_NIL); -#ifndef BOEHM_GC cv_autorelease((struct cvalue *)ptr(str)); -#endif } return str; }