summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-07-05 19:53:24 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:07:00 +0200
commit0e57ad67def39d7b672577499346103a4a19bdf8 (patch)
tree568dcefb3bc31e7b66dac6e518758a8daba5b5e4 /misc.c
parentd0f043893c60075690a974e41901fb7a878cad3d (diff)
2011-07-05 Ivan Maidanski <ivmai@mail.ru>
* misc.c (GC_init): Use HOTTER_THAN (instead of STACK_GROWS_DOWN) for GC_stackbottom assertion. * os_dep.c (GC_enclosing_mapping): Define only if IA64 or INCLUDE_LINUX_THREAD_DESCR; make GC_INNER. * pthread_support.c (GC_enclosing_mapping): Declare (only if INCLUDE_LINUX_THREAD_DESCR). * os_dep.c (GC_get_main_stack_base): Don't call pthread_getattr_np if REDIRECT_MALLOC as the former is observed to call redirected malloc (while GC is not initialized yet) on some Linux platforms. * include/private/gc_priv.h (MAX_HEAP_SECTS): Don't use a smaller value for SMALL_CONFIG if USE_PROC_FOR_LIBRARIES defined.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/misc.c b/misc.c
index c2d5cab..ab3fef9 100644
--- a/misc.c
+++ b/misc.c
@@ -914,8 +914,8 @@ GC_API void GC_CALL GC_init(void)
# if defined(NETBSD) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
-# if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \
- || defined(GC_SOLARIS_THREADS)
+# if !defined(THREADS) || defined(GC_PTHREADS) \
+ || defined(GC_WIN32_THREADS) || defined(GC_SOLARIS_THREADS)
if (GC_stackbottom == 0) {
GC_stackbottom = GC_get_main_stack_base();
# if (defined(LINUX) || defined(HPUX)) && defined(IA64)
@@ -937,11 +937,7 @@ GC_API void GC_CALL GC_init(void)
GC_STATIC_ASSERT(sizeof (signed_word) == sizeof(word));
GC_STATIC_ASSERT(sizeof (struct hblk) == HBLKSIZE);
# ifndef THREADS
-# ifdef STACK_GROWS_DOWN
- GC_ASSERT((word)(&dummy) <= (word)GC_stackbottom);
-# else
- GC_ASSERT((word)(&dummy) >= (word)GC_stackbottom);
-# endif
+ GC_ASSERT(!((word)GC_stackbottom HOTTER_THAN (word)(&dummy)));
# endif
# if !defined(_AUX_SOURCE) || defined(__GNUC__)
GC_STATIC_ASSERT((word)(-1) > (word)0);