1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

SCM_GC_MALLOC avoids BDW API

* libguile/gc.h (SCM_GC_MALLOC, SCM_GC_MALLOC_POINTERLESS): Always
redirect to scm_gc_malloc{,_pointerless}.  Don't include bdw-gc.h.
* libguile/gc-malloc.c (scm_realloc): Use Whippet gc_collect API.
* libguile/loader.c:
* libguile/scmsigs.c:
* libguile/weak-vector.c: Include bdw-gc.
This commit is contained in:
Andy Wingo 2025-05-04 11:13:52 +02:00
parent fcf8fa3d10
commit b1d7d3538a
5 changed files with 8 additions and 11 deletions

View file

@ -78,8 +78,8 @@ scm_realloc (void *mem, size_t size)
if (ptr || size == 0)
return ptr;
/* Time is hard: trigger a full, ``stop-the-world'' GC, and try again. */
GC_gcollect_and_unmap ();
/* Time is hard; attempt to reclaim memory before trying again. */
gc_collect (SCM_I_CURRENT_THREAD->mutator, GC_COLLECTION_COMPACTING);
ptr = do_realloc (mem, size);
if (ptr)