extern unsigned long heap_reserved;
/* Amount of space needed when GC requested */
+#ifndef ENABLE_SMP
extern unsigned long gc_space_needed;
+#endif
/* Number of new ephemerons requested from the GC. */
extern unsigned long n_ephemerons_requested;
extern void termination_end_of_computation (void) NORETURN;
extern void termination_trap (void) NORETURN;
extern void termination_no_error_handler (void) NORETURN;
+#ifndef ENABLE_SMP
extern void termination_gc_out_of_space (void) NORETURN;
+#endif
extern void termination_eof (void) NORETURN;
extern void termination_signal (const char * signal_name) NORETURN;
case RC_NORMAL_GC_DONE:
SET_VAL (GET_EXP);
+#ifndef ENABLE_SMP
/* Paranoia */
if (GC_NEEDED_P (gc_space_needed))
termination_gc_out_of_space ();
gc_space_needed = 0;
+#endif
EXIT_CRITICAL_SECTION ({ SAVE_CONT (); });
break;
Will_Push (CONTINUATION_SIZE);
SET_RC (RC_NORMAL_GC_DONE);
+#ifndef ENABLE_SMP
SET_EXP (ULONG_TO_FIXNUM ((HEAP_AVAILABLE > gc_space_needed)
? (HEAP_AVAILABLE - gc_space_needed)
: 0));
+#else
+ SET_EXP (ULONG_TO_FIXNUM (HEAP_AVAILABLE));
+#endif
SAVE_CONT ();
Pushed ();
(ephemeron_count + n_ephemerons_requested));
if (EPHEMERON_GC_NEEDED (length, n_ephemerons_requested))
{
+#ifndef ENABLE_SMP
if (ephemeron_request_hard_p)
gc_space_needed += (VECTOR_DATA + length);
+#endif
length = (compute_ephemeron_array_length (ephemeron_count));
#ifdef ENABLE_GC_DEBUGGING_TOOLS
/* This should never trigger, because we discard the previous
? ((unsigned long) (heap_end - Free)) \
: 0)
+#ifndef ENABLE_SMP
#define REQUEST_GC(n_words) do \
{ \
REQUEST_INTERRUPT (INT_GC); \
gc_space_needed = (n_words); \
} while (0)
+#else
+#define REQUEST_GC(n_words) do \
+{ \
+ REQUEST_INTERRUPT (INT_GC); \
+} while (0)
+#endif
#define RESET_HEAP_ALLOC_LIMIT() do \
{ \
Will_Push (CONTINUATION_SIZE);
SET_RC (RC_NORMAL_GC_DONE);
+#ifndef ENABLE_SMP
SET_EXP
(cons (SHARP_T,
(ULONG_TO_FIXNUM ((HEAP_AVAILABLE > gc_space_needed)
? (HEAP_AVAILABLE - gc_space_needed)
: 0))));
+#else
+ SET_EXP (cons (SHARP_T, (ULONG_TO_FIXNUM (HEAP_AVAILABLE))));
+#endif
SAVE_CONT ();
Pushed ();
unsigned long heap_reserved;
+#ifndef ENABLE_SMP
/* Amount of space needed when GC requested */
unsigned long gc_space_needed;
+#endif
/* Number of new ephemerons requested from the GC. */
unsigned long n_ephemerons_requested;
termination_suffix (TERM_NO_ERROR_HANDLER, 1, true);
}
+#ifndef ENABLE_SMP
void
termination_gc_out_of_space (void)
{
gc_space_needed, HEAP_AVAILABLE);
termination_suffix_trace (TERM_GC_OUT_OF_SPACE);
}
+#endif
void
termination_eof (void)