1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 20:30:28 +02:00

Hook up gc_heap_set_allocation_failure_handler

* libguile/gc.h:
* libguile/gc.c (scm_gc_after_nonlocal_exit): Give it a scm_thread
argument, and cause GC with whippet API.
(scm_init_gc): Set alloc failure handler using Whippet API instead of
BDW.
(scm_oom_fn): Add heap argumnet.

* libguile/eval.c (eval):
* libguile/exceptions.c (scm_c_with_exception_handler):
* libguile/vm.c (scm_call_n): Adapt.
This commit is contained in:
Andy Wingo 2025-04-23 14:04:23 +02:00
parent 25db208603
commit 23d204b5a0
5 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 1995-1998,2000-2001,2003-2004,2006,2008,2009-2014,2017-2019,2023
/* Copyright 1995-1998,2000-2001,2003-2004,2006,2008,2009-2014,2017-2019,2023,2025
Free Software Foundation, Inc.
This file is part of Guile.
@ -152,7 +152,7 @@ scm_c_with_exception_handler (SCM type, scm_t_exception_handler handler,
SCM args;
t->vm.registers = prev_registers;
scm_gc_after_nonlocal_exit ();
scm_gc_after_nonlocal_exit (t);
/* FIXME: We know where the args will be on the stack; we could
avoid consing them. */