mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
* gc.h (SCM_GC_SET_CELL_BVEC): New.
* gc-card.c (scm_i_init_card_freelist): Use it. Thanks to Matthias Koeppe!
This commit is contained in:
parent
20703ac4dc
commit
c5b0618d92
2 changed files with 2 additions and 1 deletions
|
@ -308,7 +308,7 @@ scm_i_init_card_freelist (scm_t_cell * card, SCM *free_list,
|
|||
int idx = (card - seg->bounds[0]) / SCM_GC_CARD_N_CELLS;
|
||||
|
||||
bvec_ptr += idx *SCM_GC_CARD_BVEC_SIZE_IN_LONGS;
|
||||
SCM_GC_CELL_BVEC (card) = bvec_ptr;
|
||||
SCM_GC_SET_CELL_BVEC (card, bvec_ptr);
|
||||
|
||||
/*
|
||||
ASSUMPTION: n_header_cells <= 2.
|
||||
|
|
|
@ -103,6 +103,7 @@ typedef struct scm_t_cell
|
|||
#define SCM_GC_CELL_CARD(x) ((scm_t_cell *) ((long) (x) & SCM_GC_CARD_ADDR_MASK))
|
||||
#define SCM_GC_CELL_OFFSET(x) (((long) (x) & SCM_GC_CARD_SIZE_MASK) >> SCM_CELL_SIZE_SHIFT)
|
||||
#define SCM_GC_CELL_BVEC(x) SCM_GC_CARD_BVEC (SCM_GC_CELL_CARD (x))
|
||||
#define SCM_GC_SET_CELL_BVEC(x, bvec) SCM_GC_SET_CARD_BVEC (SCM_GC_CELL_CARD (x), bvec)
|
||||
#define SCM_GC_CELL_GET_BIT(x) SCM_C_BVEC_GET (SCM_GC_CELL_BVEC (x), SCM_GC_CELL_OFFSET (x))
|
||||
#define SCM_GC_CELL_SET_BIT(x) SCM_C_BVEC_SET (SCM_GC_CELL_BVEC (x), SCM_GC_CELL_OFFSET (x))
|
||||
#define SCM_GC_CELL_CLEAR_BIT(x) SCM_C_BVEC_CLEAR (SCM_GC_CELL_BVEC (x), SCM_GC_CELL_OFFSET (x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue