+2008-01-29 Hans Boehm <Hans.Boehm@hp.com> (with help from Manuel Serrano)
+
+ * mark.c (GC_push_next_marked): correct comment.
+ * Makefile.direct: document NO_PROC_STAT.
+ * include/private/gcconfig.h: Accomodate NO_PROC_STAT.
+
2008-01-10 Hans Boehm <Hans.Boehm@hp.com>
* include/gc_version.h, configure.ac, doc/README:
# required for applications that store pointers in mmapped segments without
# informaing the collector. But it typically performs poorly, especially
# since it will scan inactive but cached NPTL thread stacks completely.
+# -DNO_PROC_STAT Causes the collector to avoid relying on Linux'
+# /proc/self/stat.
#
CXXFLAGS= $(CFLAGS)
* If STACKBOTTOM is defined, then it's value will be used directly as the
* stack base. If LINUX_STACKBOTTOM is defined, then it will be determined
* with a method appropriate for most Linux systems. Currently we look
- * first for __libc_stack_end, and if that fails read it from /proc.
+ * first for __libc_stack_end (currently only id USE_LIBC_PRIVATES is
+ * defined), and if that fails read it from /proc. (If USE_LIBC_PRIVATES
+ * is not defined and NO_PROC_STAT is defined, we revert to HEURISTIC2.)
* If either of the last two macros are defined, then STACKBOTTOM is computed
* during collector startup using one of the following two heuristics:
* HEURISTIC1: Take an address inside GC_init's frame, and round it up to
# endif
# endif
+#if defined(LINUX_STACKBOTTOM) && defined(NO_PROC_STAT) \
+ && !defined(USE_LIBC_PRIVATES)
+ /* This combination will fail, since we have no way to get */
+ /* the stack base. Use HEURISTIC2 instead. */
+# undef LINUX_STACKBOTTOM
+# define HEURISTIC2
+ /* This may still fail on some architectures like IA64. */
+ /* We tried ... */
+#endif
+
#if defined(LINUX) && defined(USE_MMAP)
/* The kernel may do a somewhat better job merging mappings etc. */
/* with anonymous mappings. */
}
#endif /* SMALL_CONFIG */
-/* Similar to GC_push_next_marked, but return address of next block */
+/* Similar to GC_push_marked, but skip over unallocated blocks */
+/* and return address of next plausible block. */
struct hblk * GC_push_next_marked(struct hblk *h)
{
hdr * hhdr = HDR(h);