Andy Wingo
2db9cfa918
nofl: Limit sweeping if there are empty blocks
2025-05-22 16:23:04 +02:00
Andy Wingo
6d5e7c9b60
Fix bof returning blocks from the evacuation target list to empties
2025-05-22 16:15:31 +02:00
Andy Wingo
1d157a133d
mmc: Add "headroom" for growable heaps that cannot defragment
2025-05-22 14:57:34 +02:00
Andy Wingo
eab463bd6c
nofl: Include pending large object allocations in the live data size
2025-05-22 14:57:02 +02:00
Andy Wingo
47ddd3dd5a
nofl: No evacuation reserve if evacuation is impossible
2025-05-22 14:56:43 +02:00
Andy Wingo
41de2dfd91
Update conservative roots embedder interface
2025-05-21 14:27:17 +02:00
Andy Wingo
f12990bb64
Fix alignment for platform conservative roots visitor
2025-05-21 14:26:39 +02:00
Andy Wingo
eb5f9ff878
nofl: Add asserts when getting metadata for an object
...
The metadata byte should have a mark.
2025-05-21 14:20:53 +02:00
Andy Wingo
0277953efc
gc_extern_space_visit doesn't take an edge
...
The whole extern space interface is a bit wonky but for now let's assume
that external objects can't move and therefore we don't need the edge.
2025-05-21 14:04:24 +02:00
Andy Wingo
8b9fe196a1
No need to clear allocation table during allocation
...
The mmc clears holes eagerly; there is no need to memset during
allocation.
2025-05-21 14:01:42 +02:00
Andy Wingo
b794e46635
mmc: Grow the heap if collection fails to find space for large alloc
...
For a pending large allocation, we will try to page out blocks from the
nofl space. However sometimes we are not able to do so, especially if
evacuation is unavailable, as in a heap-conservative configuration. In
that case, if the heap is growable, grow the heap after GC if there are
still bytes pending to page out.
2025-05-16 22:01:55 +02:00
Andy Wingo
fbcdffdc62
Fix bogus assert in mmc.c:deactivate_mutator
2025-05-16 22:01:15 +02:00
Andy Wingo
2018a77f36
Fix bogus static debug check in mmc init
2025-05-16 22:00:48 +02:00
Andy Wingo
e59fde2edf
Fix build issue with mmc in Guile
...
For some reason we need to include gc-api with GC_IMPL already defined,
otherwise the attrs don't get picked up.
2025-05-16 22:00:02 +02:00
Andy Wingo
7010b4fce0
Fix --with-gc-debug in whippet.m4
2025-05-16 21:59:40 +02:00
Andy Wingo
9512c8b806
Simplify mmc-attrs.h
2025-05-16 21:59:27 +02:00
Andy Wingo
8a157bc616
Add allocation counter to prepare_gc event
...
Adapt all users
2025-05-16 21:59:07 +02:00
Andy Wingo
f5edbc278b
Add warn proc to bdw
2025-05-15 15:56:40 +02:00
Andy Wingo
08e6633f93
Add embedder API to provide heap and mutator conservative roots
2025-05-15 14:46:34 +02:00
Andy Wingo
2f13187f62
Add gc_safepoint_signal_number() API
2025-05-15 11:59:51 +02:00
Andy Wingo
6a554e5dd7
Add gc_deactivate / gc_reactivate
...
Guile needs this.
2025-05-15 11:39:12 +02:00
Andy Wingo
675d8d649a
Rework gc_call_without_gc to allow reentrancy
...
Rename to gc_deactivate_for_call / gc_reactivate_for_call
2025-05-15 11:26:27 +02:00
Andy Wingo
d58aa71281
Add API to inihibit pre-emption
...
This is really only for BDW. It uses GC_alloc_lock() /
GC_alloc_unlock().
2025-05-15 09:01:28 +02:00
Andy Wingo
cc2a90b494
bdw: Fix detection of objects on free-lists
...
I am not sure about ephemerons and finalizers, though.
2025-05-12 13:38:49 +02:00
Andy Wingo
3440bb864d
bdw: Use BDW lock instead of gc_heap lock; clear dead mutators
...
This will protect traversal of the mutator list during marking. Also,
clear dead mutators, so that if they are still reachable, they won't be marked.
2025-05-12 11:52:51 +02:00
Andy Wingo
a5c69fb920
Add try-push, swap-value API to ephemerons
...
The former allows for knowing whether a push succeeded or not, which is
useful for concurrent hash tables. The latter makes ephemerons mutable,
if the embedder wants to use them that way.
2025-05-09 09:56:17 +02:00
Andy Wingo
c86408a33c
Fix ephemeron death for bdw
...
* src/bdw.c (gc_ephemeron_init): Fix misuse of disappearing-link API.
2025-05-05 10:42:28 +02:00
Andy Wingo
c7fe77de0e
Add gc_heap_contains API
2025-05-04 12:10:03 +02:00
Andy Wingo
c9063b8027
bdw: Disable thread-local freelists for pointerless allocations
...
There was a race between GC and popping the head off freelists. We
could have separate freelists for tagged and untagged normal allocations
though.
2025-04-23 17:28:46 +02:00
Andy Wingo
06b53470f4
For freelist allocators, clear the freelist link on the returned obj
...
* api/gc-api.h (gc_allocate_small_fast_freelist):
* src/bdw.c (allocate_small): Clear freelist link, so the object is
completely zeroed. In some cases the embedder / compiler / JIT will be
able to elide this write.
2025-04-23 16:44:59 +02:00
Andy Wingo
e2b75d302d
Add gc_heap_set_allocation_failure_handler
...
Also wire it up to bdw.
2025-04-23 11:42:21 +02:00
Andy Wingo
1e41f0e093
mmc: Tail-call an out-of-memory handler if allocation fails
2025-04-23 11:31:15 +02:00
Andy Wingo
a0148d4b38
pcc: Tail-call an out-of-memory handler if allocation fails
2025-04-23 10:47:32 +02:00
Andy Wingo
6032adede9
semi: Tail-call an out-of-memory handler if allocation fails
2025-04-23 10:47:13 +02:00
Andy Wingo
31b373b8f2
copy space: Palliate a failure mode due to fragmentation
2025-04-23 10:46:23 +02:00
Andy Wingo
3c4fdfde0e
Fix embarassing bug in which lack of MAP_FIXED meant unaligned slabs
...
This would manifest itself in odd failures when accessing
block/object metadata on slabs.
2025-04-23 10:43:14 +02:00
Andy Wingo
1818d7fa0b
Add -fno-strict-aliasing to libwhippet CFLAGS
2025-04-22 10:01:21 +02:00
Andy Wingo
2dab407ec1
Expose definition of gc_stack_addr, rework API
2025-04-18 15:08:01 +02:00
Andy Wingo
d3df1a632a
Record last live data size in basic stats.
2025-04-17 12:29:30 +02:00
Andy Wingo
e4f9b1d8f8
Use abspath in GNU make snippet
2025-04-16 13:39:16 +02:00
Andy Wingo
022052b207
Fix embed.mk
2025-04-16 13:15:13 +02:00
Andy Wingo
185804dc41
Fix embed.am to not have libwhippet-common.la
2025-04-16 12:44:30 +02:00
Andy Wingo
a9ba085ad0
Add missing file
2025-04-16 12:43:15 +02:00
Andy Wingo
55d3fb7dc7
More build system reworking
2025-04-16 12:41:42 +02:00
Andy Wingo
75700ec3ed
More build system reworking
2025-04-16 12:40:44 +02:00
Andy Wingo
6e36c039e9
Rework extension points between embedder and GC
2025-04-16 12:06:02 +02:00
Andy Wingo
424a0cefd9
autotools: refactor to avoid defining noinst_HEADERS
2025-04-15 13:03:11 +02:00
Andy Wingo
27d66fa349
m4: Fix WHIPPET_PKG_BDW quoting error
2025-04-15 11:04:30 +02:00
Andy Wingo
e060c5fc99
Add --with-bdw-gc
2025-04-15 10:25:51 +02:00
Andy Wingo
f909438596
Fix distcheck, better docs
2025-04-10 14:07:52 +02:00