mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-14 17:50:22 +02:00
Add conservative heap tracing (not just roots)
Also accelerate mark_space_live_object_granules.
This commit is contained in:
parent
053dbf0b61
commit
910b62af8f
13 changed files with 221 additions and 94 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "gc-assert.h"
|
||||
#include "gc-ref.h"
|
||||
#include "gc-conservative-ref.h"
|
||||
#include "address-map.h"
|
||||
|
@ -96,6 +97,14 @@ static int large_object_space_mark_object(struct large_object_space *space,
|
|||
return large_object_space_copy(space, ref);
|
||||
}
|
||||
|
||||
static inline size_t large_object_space_object_size(struct large_object_space *space,
|
||||
struct gc_ref ref) {
|
||||
size_t npages = address_map_lookup(&space->object_pages,
|
||||
gc_ref_value(ref), 0);
|
||||
GC_ASSERT(npages != 0);
|
||||
return npages * space->page_size;
|
||||
}
|
||||
|
||||
static void large_object_space_reclaim_one(uintptr_t addr, void *data) {
|
||||
struct large_object_space *space = data;
|
||||
size_t npages = address_map_lookup(&space->object_pages, addr, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue