mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-07 01:50:32 +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
|
@ -45,13 +45,6 @@
|
|||
|
||||
|
||||
|
||||
static inline void *
|
||||
scm_inline_allocate_pointerless (scm_thread *thread, size_t bytes)
|
||||
{
|
||||
return gc_allocate (thread->mutator, bytes,
|
||||
GC_ALLOCATION_UNTAGGED_POINTERLESS);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
scm_inline_allocate_tagged (scm_thread *thread, size_t bytes)
|
||||
{
|
||||
|
@ -59,6 +52,20 @@ scm_inline_allocate_tagged (scm_thread *thread, size_t bytes)
|
|||
GC_ALLOCATION_TAGGED);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
scm_inline_allocate_tagged_pointerless (scm_thread *thread, size_t bytes)
|
||||
{
|
||||
return gc_allocate (thread->mutator, bytes,
|
||||
GC_ALLOCATION_TAGGED_POINTERLESS);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
scm_inline_allocate_untagged_pointerless (scm_thread *thread, size_t bytes)
|
||||
{
|
||||
return gc_allocate (thread->mutator, bytes,
|
||||
GC_ALLOCATION_UNTAGGED_POINTERLESS);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
scm_inline_allocate_sloppy (scm_thread *thread, size_t bytes)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue