* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
* os_dep.c (GC_get_main_stack_base): Recognize
USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
and use GC_get_stack_base() in this case.
+2010-03-12 Ivan Maidanski <ivmai@mail.ru>
+
+ * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
+ * os_dep.c (GC_get_main_stack_base): Recognize
+ USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
+ and use GC_get_stack_base() in this case.
+
2010-03-05 Ivan Maidanski <ivmai@mail.ru> (really Burkhard Linke)
* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
of ANSI/ASCII one ('A'). Useful for WinCE.
PLATFORM_ANDROID Compile for Android NDK platform.
+
+USE_GET_STACKBASE_FOR_MAIN (Linux only) Use pthread_attr_getstack() instead
+of __libc_stack_end for getting the primordial thread stack base (useful if
+the client modifies the program's address space).
# endif
# endif /* HEURISTIC1 */
# ifdef LINUX_STACKBOTTOM
+# if defined(THREADS) && defined(USE_GET_STACKBASE_FOR_MAIN)
+ {
+ struct GC_stack_base sb;
+ if (GC_get_stack_base(&sb) == GC_SUCCESS)
+ return (ptr_t)sb.mem_base;
+ }
+# endif
result = GC_linux_stack_base();
# endif
# ifdef FREEBSD_STACKBOTTOM