summaryrefslogtreecommitdiff
path: root/libguile/struct.c
diff options
context:
space:
mode:
authorLudovic Courtes <ludovic.courtes@laas.fr>2006-11-27 00:14:23 +0000
committerLudovic Courtès <ludo@gnu.org>2008-09-10 22:19:11 +0200
commit184327a68d7aa6aa2576c398d324bd9def12ad67 (patch)
treeee268dce906a4ea1e74cd099511475077dd2f8d0 /libguile/struct.c
parent915b3f9f9af5b9dce63e8d9df2ae4edba709d4b5 (diff)
downloadguile-184327a68d7aa6aa2576c398d324bd9def12ad67.tar.gz
Turn "all interior pointers" off (slight performance gain).
* libguile/gc.c (scm_storage_prehistory): Set `GC_all_interior_pointers' to 0. Register `scm_tc3_cons' and `scm_tc3_closure' as valid displacements. * libguile/struct.c (scm_alloc_struct): Register additional displacements. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-48
Diffstat (limited to 'libguile/struct.c')
-rw-r--r--libguile/struct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/struct.c b/libguile/struct.c
index a31ab0629..38331dd0f 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -311,6 +311,12 @@ scm_alloc_struct (int n_words, int n_extra, const char *what)
p[scm_struct_i_n_words] = n_words;
p[scm_struct_i_flags] = 0;
+ /* Since `SCM' objects will record either P or P + SCM_TC3_STRUCT, we need
+ to register them as valid displacements. Fortunately, only a handful of
+ N_EXTRA values are used in core Guile. */
+ GC_REGISTER_DISPLACEMENT ((char *)p - (char *)block);
+ GC_REGISTER_DISPLACEMENT ((char *)p - (char *)block + scm_tc3_struct);
+
return p;
}