1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-02 15:40:38 +02:00

Convert scm_gc_malloc* calls to scm_allocate*

* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/chooks.c:
* libguile/continuations.c:
* libguile/control.c:
* libguile/dynstack.c:
* libguile/ephemerons.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gsubr.c:
* libguile/hashtab.c:
* libguile/i18n.c:
* libguile/integers.c:
* libguile/intrinsics.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/numbers.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/programs.h:
* libguile/random.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/smob.c:
* libguile/srfi-14.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/threads.c:
* libguile/threads.h:
* libguile/values.c:
* libguile/vm.c: Convert all calls to scm_gc_malloc_pointerless to
scm_allocate_pointerless.  Convert scm_gc_malloc to either
scm_allocate_tagged or scm_allocate_sloppy, depending on whether the
value can be precisely traced or not.
This commit is contained in:
Andy Wingo 2025-06-20 11:40:01 +02:00
parent 290a57b1b0
commit f2ad6525e6
35 changed files with 126 additions and 102 deletions

View file

@ -1017,7 +1017,7 @@ SCM_DEFINE (scm_make_mutex_with_kind, "make-mutex", 0, 1, 0,
SCM_MISC_ERROR ("unsupported mutex kind: ~a", scm_list_1 (kind));
}
m = scm_gc_malloc (sizeof (struct scm_mutex), "mutex");
m = scm_allocate_tagged (SCM_I_CURRENT_THREAD, sizeof (struct scm_mutex));
m->tag_and_flags = scm_tc16_mutex | (mkind << 16);
m->owner = SCM_BOOL_F;
m->waiting = make_queue ();
@ -1353,7 +1353,7 @@ SCM_DEFINE (scm_make_condition_variable, "make-condition-variable", 0, 0, 0,
#define FUNC_NAME s_scm_make_condition_variable
{
struct scm_cond *c =
scm_gc_malloc (sizeof (struct scm_cond), "condition variable");
scm_allocate_tagged (SCM_I_CURRENT_THREAD, sizeof (struct scm_cond));
c->tag = scm_tc16_condition_variable;
c->waiting = make_queue ();
return scm_from_condvar (c);