mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-06 09:30:29 +02:00
Separate tagged and untagged pointerless allocations
Tagged allocations can move; untagged allocations cannot. * libguile/gc-inline.h: * libguile/gc-malloc.c: * libguile/gc.h: Split scm_allocate_pointerless into tagged and untagged variants. * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/foreign.c: * libguile/fports.c: * libguile/integers.c: * libguile/intrinsics.c: * libguile/load.c: * libguile/loader.c: * libguile/numbers.c: * libguile/programs.h: * libguile/random.c: * libguile/read.c: * libguile/regex-posix.c: * libguile/smob.c: * libguile/strings.c: * libguile/vm.c: Use the new functions.
This commit is contained in:
parent
e21aa9c513
commit
8623e252bf
19 changed files with 85 additions and 72 deletions
|
@ -233,8 +233,8 @@ make_bytevector (size_t len, scm_t_array_element_type element_type)
|
|||
|
||||
size_t c_len = len * bytes_per_elt;
|
||||
struct scm_bytevector *bv =
|
||||
scm_allocate_pointerless (SCM_I_CURRENT_THREAD,
|
||||
sizeof (struct scm_bytevector) + c_len);
|
||||
scm_allocate_tagged_pointerless (SCM_I_CURRENT_THREAD,
|
||||
sizeof (struct scm_bytevector) + c_len);
|
||||
|
||||
scm_t_bits flags = SCM_F_BYTEVECTOR_CONTIGUOUS;
|
||||
bv->tag_flags_and_element_type = make_bytevector_tag (flags, element_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue