mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 08:40:19 +02:00
Add gc_allocation_kind argument to gc_allocate
Adapt all users. Will eventually allow for mmc to have untagged allocations.
This commit is contained in:
parent
5bddd522cf
commit
521cd44ebd
13 changed files with 158 additions and 75 deletions
|
@ -6,14 +6,14 @@
|
|||
|
||||
static inline void*
|
||||
gc_allocate_with_kind(struct gc_mutator *mut, enum alloc_kind kind, size_t bytes) {
|
||||
void *obj = gc_allocate(mut, bytes);
|
||||
void *obj = gc_allocate(mut, bytes, GC_ALLOCATION_TAGGED);
|
||||
*tag_word(gc_ref_from_heap_object(obj)) = tag_live(kind);
|
||||
return obj;
|
||||
}
|
||||
|
||||
static inline void*
|
||||
gc_allocate_pointerless_with_kind(struct gc_mutator *mut, enum alloc_kind kind, size_t bytes) {
|
||||
void *obj = gc_allocate_pointerless(mut, bytes);
|
||||
void *obj = gc_allocate(mut, bytes, GC_ALLOCATION_TAGGED_POINTERLESS);
|
||||
*tag_word(gc_ref_from_heap_object(obj)) = tag_live(kind);
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue