/* #define DEBUGINFO */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef FUNC_NAME
+SCM_DEFINE (scm_gc_dump, "gc-dump", 0, 0, 0,
+ (void),
+ "Dump information about the garbage collector's internal data "
+ "structures and memory usage to the standard output.")
+#define FUNC_NAME s_scm_gc_dump
+{
+ GC_dump ();
+
+ return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
SCM_DEFINE (scm_object_address, "object-address", 1, 0, 0,
(SCM obj),
#define FUNC_NAME s_scm_gc
{
scm_i_scm_pthread_mutex_lock (&scm_i_sweep_mutex);
- scm_gc_running_p = 1;
scm_i_gc ("call");
/* njrev: It looks as though other places, e.g. scm_realloc,
can call scm_i_gc without acquiring the sweep mutex. Does this
(e.g. scm_permobjs above in scm_gc_stats) by a critical section,
not by the sweep mutex. Shouldn't all the GC-relevant objects be
protected in the same way? */
- scm_gc_running_p = 0;
scm_i_pthread_mutex_unlock (&scm_i_sweep_mutex);
scm_c_hook_run (&scm_after_gc_c_hook, 0);
return SCM_UNSPECIFIED;
scm_storage_prehistory ()
{
GC_all_interior_pointers = 0;
+ GC_set_free_space_divisor (scm_getenv_int ("GC_FREE_SPACE_DIVISOR", 3));
GC_INIT ();
-#ifdef SCM_I_GSC_USE_PTHREAD_THREADS
+#if (! ((defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR >= 7))) \
+ && (defined SCM_I_GSC_USE_PTHREAD_THREADS)
/* When using GC 6.8, this call is required to initialize thread-local
freelists (shouldn't be necessary with GC 7.0). */
GC_init ();