gc: do not return 0

This commit is contained in:
Jan Nieuwenhuizen 2019-10-30 23:04:22 +01:00
parent ca58bec16f
commit 79d0c92225
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 6 additions and 10 deletions

View File

@ -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"

View File

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