aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/mallocx.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
committerBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
commit93002327db5e5f466de60dc3f8c876cf9a56e183 (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/mallocx.c
parent5e787f078df8900b34981443e9f968fd5c3b039c (diff)
downloadgcc-93002327db5e5f466de60dc3f8c876cf9a56e183.zip
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.gz
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.bz2
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
Diffstat (limited to 'boehm-gc/mallocx.c')
-rw-r--r--boehm-gc/mallocx.c34
1 files changed, 23 insertions, 11 deletions
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);