gc: do not return 0
This commit is contained in:
parent
ca58bec16f
commit
79d0c92225
|
@ -81,7 +81,6 @@ SCM builtin_name (SCM builtin);
|
|||
SCM cstring_to_list (char const *s);
|
||||
SCM cstring_to_symbol (char const *s);
|
||||
SCM fdisplay_ (SCM, int, int);
|
||||
SCM gc_init ();
|
||||
SCM gc_peek_frame ();
|
||||
SCM gc_pop_frame ();
|
||||
SCM gc_push_frame ();
|
||||
|
@ -119,6 +118,7 @@ size_t bytes_cells (size_t length);
|
|||
void assert_max_string (size_t i, char const *msg, char *string);
|
||||
void assert_msg (int check, char *msg);
|
||||
void gc_ ();
|
||||
void gc_init ();
|
||||
|
||||
#include "mes/builtins.h"
|
||||
#include "mes/constants.h"
|
||||
|
|
14
src/gc.c
14
src/gc.c
|
@ -50,8 +50,8 @@ news_bytes (SCM x)
|
|||
return &NCDR (x);
|
||||
}
|
||||
|
||||
SCM
|
||||
gc_init () /*:((internal)) */
|
||||
void
|
||||
gc_init ()
|
||||
{
|
||||
#if SYSTEM_LIBC
|
||||
ARENA_SIZE = 100000000; /* 2.3GiB */
|
||||
|
@ -95,8 +95,6 @@ gc_init () /*:((internal)) */
|
|||
|
||||
/* FIXME: remove MES_MAX_STRING, grow dynamically */
|
||||
g_buf = malloc (MAX_STRING);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SCM
|
||||
|
@ -221,8 +219,8 @@ make_string_port (SCM x) /*:((internal)) */
|
|||
return make_cell (TPORT, -length__ (g_ports) - 2, x);
|
||||
}
|
||||
|
||||
SCM
|
||||
gc_up_arena () /*:((internal)) */
|
||||
void
|
||||
gc_up_arena ()
|
||||
{
|
||||
long old_arena_bytes = (ARENA_SIZE + JAM_SIZE) * sizeof (struct scm);
|
||||
if (ARENA_SIZE >> 1 < MAX_ARENA_SIZE >> 2)
|
||||
|
@ -248,12 +246,10 @@ gc_up_arena () /*:((internal)) */
|
|||
g_cells = p;
|
||||
memcpy (p + arena_bytes, p + old_arena_bytes, STACK_SIZE * sizeof (SCM));
|
||||
g_cells = g_cells + 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
gc_flip () /*:((internal)) */
|
||||
gc_flip ()
|
||||
{
|
||||
if (g_debug > 2)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue