* mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
* stubborn.c (GC_dirty): Ditto.
* include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
PROC_VDB): Undefine if MANUAL_VDB.
* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
MANUAL_VDB.
* os_dep.c (async_set_pht_entry_from_index): Define for
MANUAL_VDB.
* os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
success; if ioctl() failed then just print warning instead of
aborting.
+2011-05-23 Ivan Maidanski <ivmai@mail.ru>
+
+ * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
+ * stubborn.c (GC_dirty): Ditto.
+ * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
+ PROC_VDB): Undefine if MANUAL_VDB.
+ * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
+ MANUAL_VDB.
+ * os_dep.c (async_set_pht_entry_from_index): Define for
+ MANUAL_VDB.
+ * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
+ success; if ioctl() failed then just print warning instead of
+ aborting.
+
2011-05-23 Ivan Maidanski <ivmai@mail.ru>
* include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
# define GC_DISABLE_INCREMENTAL
#endif
-#ifdef GC_DISABLE_INCREMENTAL
+#if defined(GC_DISABLE_INCREMENTAL) || defined(MANUAL_VDB)
# undef GWW_VDB
# undef MPROTECT_VDB
# undef PCR_VDB
# undef PROC_VDB
+#endif
+
+#ifdef GC_DISABLE_INCREMENTAL
# undef CHECKSUMS
#endif
#endif
#if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB) \
- && !defined(GWW_VDB) && !defined(GC_DISABLE_INCREMENTAL)
+ && !defined(GWW_VDB) && !defined(MANUAL_VDB) \
+ && !defined(GC_DISABLE_INCREMENTAL)
# define DEFAULT_VDB
#endif
return mark_stack_ptr;
}
+#if defined(MANUAL_VDB) && defined(THREADS)
+ void GC_dirty(ptr_t p);
+#endif
+
/* Mark and push (i.e. gray) a single object p onto the main */
/* mark stack. Consider p to be valid if it is an interior */
/* pointer. */
}
# if defined(MANUAL_VDB) && defined(THREADS)
/* Pointer is on the stack. We may have dirtied the object */
- /* it points to, but not yet have called GC_dirty(); */
- GC_dirty(p); /* Implicitly affects entire object. */
+ /* it points to, but not yet have called GC_dirty(); */
+ GC_dirty(p); /* Implicitly affects entire object. */
# endif
PUSH_CONTENTS_HDR(r, GC_mark_stack_top, GC_mark_stack_limit,
source, mark_and_push_exit, hhdr, FALSE);
return(HDR(h) == 0 || get_pht_entry_from_index(GC_grungy_pages, index));
}
+# define async_set_pht_entry_from_index(db, index) \
+ set_pht_entry_from_index(db, index) /* for now */
+
/* Mark the page containing p as dirty. Logically, this dirties the */
/* entire object. */
void GC_dirty(ptr_t p)
int fd;
char buf[30];
- GC_dirty_maintained = TRUE;
if (GC_bytes_allocd != 0 || GC_bytes_allocd_before_gc != 0) {
memset(GC_written_pages, 0xff, sizeof(page_hash_table));
if (GC_print_stats == VERBOSE)
(unsigned long)(GC_bytes_allocd
+ GC_bytes_allocd_before_gc));
}
+
sprintf(buf, "/proc/%ld", (long)getpid());
fd = open(buf, O_RDONLY);
if (fd < 0) {
close(fd);
syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC);
if (GC_proc_fd < 0) {
- ABORT("/proc ioctl failed");
+ WARN("/proc ioctl(PIOCOPENPD) failed", 0);
+ return;
}
+
+ GC_dirty_maintained = TRUE;
GC_proc_buf = GC_scratch_alloc(GC_proc_buf_size);
}
/* written, but not yet GC_dirty()ed objects must be referenced */
/* by a stack. */
+ void GC_dirty(ptr_t p);
+
GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
{
return(GC_malloc(lb));