mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 08:47:35 +02:00
Fixed heap init
This commit is contained in:
parent
149aea2c0a
commit
df53ec99a6
3 changed files with 7 additions and 1 deletions
|
@ -27,7 +27,7 @@ static void Cyc_heap_init(long heap_size)
|
|||
#if DEBUG_SHOW_DIAG
|
||||
printf("main: Allocating and initializing heap...\n");
|
||||
#endif
|
||||
Cyc_heap = gc_heap_create(heap_size / 2, 0, 0);
|
||||
gc_init_heap();
|
||||
gc_init_mutators();
|
||||
gc_start_collector();
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ object cell_get(object cell);
|
|||
extern object Cyc_global_variables;
|
||||
int _cyc_argc;
|
||||
char **_cyc_argv;
|
||||
void Cyc_init_heap(long heap_size);
|
||||
object Cyc_get_global_variables();
|
||||
object Cyc_get_cvar(object var);
|
||||
object Cyc_set_cvar(object var, object value);
|
||||
|
|
|
@ -90,6 +90,11 @@ char **_cyc_argv = NULL;
|
|||
static symbol_type __EOF = {{0}, eof_tag, "", nil}; // symbol_type in lieu of custom type
|
||||
const object Cyc_EOF = &__EOF;
|
||||
|
||||
void Cyc_init_heap(long heap_size)
|
||||
{
|
||||
Cyc_heap = gc_heap_create(heap_size, 0, 0);
|
||||
}
|
||||
|
||||
gc_heap *Cyc_get_heap()
|
||||
{
|
||||
return Cyc_heap;
|
||||
|
|
Loading…
Add table
Reference in a new issue