summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 13:16:41 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 13:16:41 +0200
commit7d3768dbd2a1cd4d5c14f773f23aec43bc0651a5 (patch)
tree1cb52688b70322e994f4c2377ad715dbe8edb7d7 /malloc.c
parentf9b1aa2161e755a5f5b772b5698aab8a63d0bef4 (diff)
gc4.12 tarball importgc4_12
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 1596e05..6b8c092 100644
--- a/malloc.c
+++ b/malloc.c
@@ -216,6 +216,13 @@ DCL_LOCK_STATE;
/* It might help to manually inline the GC_malloc call here. */
/* But any decent compiler should reduce the extra procedure call */
/* to at most a jump instruction in this case. */
+# if defined(I386) && defined(SOLARIS_THREADS)
+ /*
+ * Thread initialisation can call malloc before
+ * we're ready for it.
+ */
+ if (!GC_is_initialized) return sbrk(lb);
+# endif /* I386 && SOLARIS_THREADS */
return(REDIRECT_MALLOC(lb));
}