Remove unused Boehm GC hooks

This commit is contained in:
Lassi Kortela 2019-08-09 20:37:42 +03:00
parent 10ffed569e
commit d5d7406276
3 changed files with 1 additions and 20 deletions

View File

@ -87,18 +87,9 @@
#error "unknown platform"
#endif
#ifdef BOEHM_GC
// boehm GC allocator
#include <gc.h>
#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;

View File

@ -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)
{

View File

@ -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;
}