2011-05-11 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Wed, 11 May 2011 09:12:35 +0000 (09:12 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:59 +0000 (21:06 +0400)
* os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
GWW_VDB).
* os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
resetting (for PROC_VDB).

ChangeLog
os_dep.c

index 0e45f4a..dff0280 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-11  Ivan Maidanski  <ivmai@mail.ru>
+
+       * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
+       GWW_VDB).
+       * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
+       resetting (for PROC_VDB).
+
 2011-05-11  Ivan Maidanski  <ivmai@mail.ru> (mostly really Ludovic Courtes)
 
        * tests/threadkey_test.c: New file.
index eb69a7e..ed8726e 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -2772,7 +2772,7 @@ STATIC void GC_default_push_other_roots(void)
   }
 
 # ifdef CHECKSUMS
-    /* Used only if PROC_VDB. */
+    /* Used only if GWW_VDB. */
 #   ifdef MPROTECT_VDB
       STATIC GC_bool GC_gww_page_was_ever_dirty(struct hblk * h)
 #   else
@@ -3641,9 +3641,7 @@ GC_INNER void GC_dirty_init(void)
 
     GC_dirty_maintained = TRUE;
     if (GC_bytes_allocd != 0 || GC_bytes_allocd_before_gc != 0) {
-      register int i;
-      for (i = 0; i < PHT_SIZE; i++)
-        GC_written_pages[i] = (word)(-1);
+      memset(GC_written_pages, 0xff, sizeof(page_hash_table));
       if (GC_print_stats == VERBOSE)
         GC_log_printf("Allocated bytes:%lu:all pages may have been written\n",
                       (unsigned long)(GC_bytes_allocd