1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +02:00

Add gc_collect(mutator) API

This commit is contained in:
Andy Wingo 2023-01-22 21:04:20 +01:00
parent 1b3bc2f3b5
commit 44f37a373c
4 changed files with 11 additions and 1 deletions

4
semi.c
View file

@ -171,6 +171,10 @@ static void collect(struct gc_mutator *mut) {
// fprintf(stderr, "%zd bytes copied\n", (space->size>>1)-(space->limit-space->hp));
}
void gc_collect(struct gc_mutator *mut) {
collect(mut);
}
static void collect_for_alloc(struct gc_mutator *mut, size_t bytes) {
collect(mut);
struct semi_space *space = mutator_semi_space(mut);