mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-27 21:40:34 +02:00
Add ephemeron implementation
This commit adds support for ephemerons to the API and wires it into the collectors. It also adds a new test.
This commit is contained in:
parent
44f37a373c
commit
78da8d5811
18 changed files with 1455 additions and 56 deletions
|
@ -92,6 +92,16 @@ done:
|
|||
return copied;
|
||||
}
|
||||
|
||||
static int large_object_space_is_copied(struct large_object_space *space,
|
||||
struct gc_ref ref) {
|
||||
int copied = 0;
|
||||
uintptr_t addr = gc_ref_value(ref);
|
||||
pthread_mutex_lock(&space->lock);
|
||||
copied = address_set_contains(&space->from_space, addr);
|
||||
pthread_mutex_unlock(&space->lock);
|
||||
return copied;
|
||||
}
|
||||
|
||||
static int large_object_space_mark_object(struct large_object_space *space,
|
||||
struct gc_ref ref) {
|
||||
return large_object_space_copy(space, ref);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue