diff options
author | Andy Wingo <wingo@pobox.com> | 2019-06-20 13:44:47 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-06-20 13:48:24 +0200 |
commit | 33aecf48b057f6f3abd65bea7c4b7a0d9aadf980 (patch) | |
tree | 079e3cfac867db563a67061b69f2c7b912b2eb74 /libguile/gc-inline.h | |
parent | 117bb3badeee5b5f803a93acba8197540cab4fb6 (diff) | |
download | guile-33aecf48b057f6f3abd65bea7c4b7a0d9aadf980.tar.gz |
Inline freelist vectors into scm_thread
* libguile/gc-inline.h:
* libguile/threads.h (SCM_INLINE_GC_GRANULE_WORDS)
(SCM_INLINE_GC_GRANULE_BYTES, SCM_INLINE_GC_FREELIST_COUNT): Move
definitions here, from gc-inline.h.
(struct scm_thread): Inline freelist vectors.
* libguile/threads.c (thread_mark): Update marker for pointerless
freelists.
(on_thread_exit): Clear individual freelist entries, instead of the
vector as a whole.
(guilify_self_2): No need to alloc freelist vectors.
Diffstat (limited to 'libguile/gc-inline.h')
-rw-r--r-- | libguile/gc-inline.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/libguile/gc-inline.h b/libguile/gc-inline.h index 62fdb9eec..a1932d65a 100644 --- a/libguile/gc-inline.h +++ b/libguile/gc-inline.h @@ -1,7 +1,7 @@ #ifndef SCM_GC_INLINE_H #define SCM_GC_INLINE_H -/* Copyright 1995-1996,1998-2004,2006-2014,2018 +/* Copyright 1995-1996,1998-2004,2006-2014,2018-2019 Free Software Foundation, Inc. This file is part of Guile. @@ -47,17 +47,6 @@ -#define SCM_INLINE_GC_GRANULE_WORDS 2 -#define SCM_INLINE_GC_GRANULE_BYTES \ - (sizeof(void *) * SCM_INLINE_GC_GRANULE_WORDS) - -/* A freelist set contains SCM_INLINE_GC_FREELIST_COUNT pointers to - singly linked lists of objects of different sizes, the ith one - containing objects i + 1 granules in size. This setting of - SCM_INLINE_GC_FREELIST_COUNT will hold freelists for allocations of - up to 256 bytes. */ -#define SCM_INLINE_GC_FREELIST_COUNT (256U / SCM_INLINE_GC_GRANULE_BYTES) - static inline size_t scm_inline_gc_bytes_to_freelist_index (size_t bytes) { |