From 93002327db5e5f466de60dc3f8c876cf9a56e183 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Wed, 19 Apr 2000 11:10:01 +0100 Subject: Imported version version 5.0alpha6. * acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. From-SVN: r33251 --- boehm-gc/mallocx.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'boehm-gc/mallocx.c') diff --git a/boehm-gc/mallocx.c b/boehm-gc/mallocx.c index 8c07fa9..c842665 100644 --- a/boehm-gc/mallocx.c +++ b/boehm-gc/mallocx.c @@ -134,22 +134,14 @@ void GC_incr_mem_freed(size_t n) /* Analogous to the above, but assumes a small object size, and */ /* bypasses MERGE_SIZES mechanism. Used by gc_inline.h. */ -#ifdef __STDC__ - ptr_t GC_generic_malloc_words_small(size_t lw, int k) -#else - ptr_t GC_generic_malloc_words_small(lw, k) - register word lw; - register int k; -#endif +ptr_t GC_generic_malloc_words_small_inner(lw, k) +register word lw; +register int k; { register ptr_t op; register ptr_t *opp; register struct obj_kind * kind = GC_obj_kinds + k; -DCL_LOCK_STATE; - GC_INVOKE_FINALIZERS(); - DISABLE_SIGNALS(); - LOCK(); opp = &(kind -> ok_freelist[lw]); if( (op = *opp) == 0 ) { if (!GC_is_initialized) { @@ -167,6 +159,26 @@ DCL_LOCK_STATE; *opp = obj_link(op); obj_link(op) = 0; GC_words_allocd += lw; + return((ptr_t)op); +} + +/* Analogous to the above, but assumes a small object size, and */ +/* bypasses MERGE_SIZES mechanism. Used by gc_inline.h. */ +#ifdef __STDC__ + ptr_t GC_generic_malloc_words_small(size_t lw, int k) +#else + ptr_t GC_generic_malloc_words_small(lw, k) + register word lw; + register int k; +#endif +{ +register ptr_t op; +DCL_LOCK_STATE; + + GC_INVOKE_FINALIZERS(); + DISABLE_SIGNALS(); + LOCK(); + op = GC_generic_malloc_words_small_inner(lw, k); UNLOCK(); ENABLE_SIGNALS(); return((ptr_t)op); -- cgit v1.1