mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Heap growth can compete with lospace for nofl blocks
This commit is contained in:
parent
317039d952
commit
1bf250f62a
2 changed files with 6 additions and 7 deletions
|
@ -395,7 +395,12 @@ heap_reset_large_object_pages(struct gc_heap *heap, size_t npages) {
|
||||||
GC_ASSERT(npages <= previous);
|
GC_ASSERT(npages <= previous);
|
||||||
size_t bytes = (previous - npages) <<
|
size_t bytes = (previous - npages) <<
|
||||||
heap_large_object_space(heap)->page_size_log2;
|
heap_large_object_space(heap)->page_size_log2;
|
||||||
nofl_space_reacquire_memory(heap_nofl_space(heap), bytes);
|
// If heap size is fixed, we won't need to allocate any more nofl blocks, as
|
||||||
|
// nothing uses paged-out blocks except large object allocation. But if the
|
||||||
|
// heap can grow, growth can consume nofl-space blocks that were paged out to
|
||||||
|
// allow for lospace allocations, which means that here we may need to
|
||||||
|
// allocate additional slabs.
|
||||||
|
nofl_space_expand(heap_nofl_space(heap), bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1291,12 +1291,6 @@ nofl_space_maybe_reacquire_memory(struct nofl_space *space, size_t bytes) {
|
||||||
return pending;
|
return pending;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
nofl_space_reacquire_memory(struct nofl_space *space, size_t bytes) {
|
|
||||||
ssize_t pending = nofl_space_maybe_reacquire_memory(space, bytes);
|
|
||||||
GC_ASSERT(pending + NOFL_BLOCK_SIZE > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nofl_space_sweep_until_memory_released(struct nofl_space *space,
|
nofl_space_sweep_until_memory_released(struct nofl_space *space,
|
||||||
struct nofl_allocator *alloc) {
|
struct nofl_allocator *alloc) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue