]> granicus.if.org Git - gc/commitdiff
2009-11-05 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Thu, 5 Nov 2009 11:58:23 +0000 (11:58 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:51 +0000 (21:06 +0400)
* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
with "0x".
* os_dep.c (PROTECT): Ditto.
* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
int (to match printf type specifier).

ChangeLog
dyn_load.c
os_dep.c
win32_threads.c

index 72bde0d116e9beb10b1358806c179ca4c5a0e227..693c806a6b9cedec51a140d990182ea5d8e0926e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
+       with "0x".
+       * os_dep.c (PROTECT): Ditto.
+       * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
+       int (to match printf type specifier).
+
 2009-11-05  Ivan Maidanski <ivmai@mail.ru>
 
        * tests/test.c (check_heap_stats): Take into account the unmapped
index 89874dd0dcd10598ffee9c5bade50d943d8d7acc..ccb08d53212a116266191b49eb56136bde172d2d 100644 (file)
@@ -843,13 +843,12 @@ GC_INNER void GC_register_dynamic_libraries(void)
 # ifdef DEBUG_VIRTUALQUERY
   void GC_dump_meminfo(MEMORY_BASIC_INFORMATION *buf)
   {
-    GC_printf("BaseAddress = %lx, AllocationBase = %lx, RegionSize = %lx(%lu)\n",
-               buf -> BaseAddress, buf -> AllocationBase, buf -> RegionSize,
-               buf -> RegionSize);
-    GC_printf("\tAllocationProtect = %lx, State = %lx, Protect = %lx, "
-               "Type = %lx\n",
-               buf -> AllocationProtect, buf -> State, buf -> Protect,
-               buf -> Type);
+    GC_printf("BaseAddress = 0x%lx, AllocationBase = 0x%lx,"
+              " RegionSize = 0x%lx(%lu)\n", buf -> BaseAddress,
+              buf -> AllocationBase, buf -> RegionSize, buf -> RegionSize);
+    GC_printf("\tAllocationProtect = 0x%lx, State = 0x%lx, Protect = 0x%lx, "
+              "Type = 0x%lx\n", buf -> AllocationProtect, buf -> State,
+              buf -> Protect, buf -> Type);
   }
 # endif /* DEBUG_VIRTUALQUERY */
 
index 239dae8444cfe8ea11c2dbcd4fa144fcc28e1aea..01352cb36a0c0e60041536b6aaf7c7bd2f5165ca 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -2767,7 +2767,7 @@ GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
 #   define PROTECT(addr, len) \
           if (!VirtualProtect((addr), (len), PAGE_EXECUTE_READ, \
                               &protect_junk)) { \
-            GC_printf("Last error code: %lx\n", (long)GetLastError()); \
+            GC_printf("Last error code: 0x%lx\n", (long)GetLastError()); \
             ABORT("VirtualProtect failed"); \
           }
 #   define UNPROTECT(addr, len) \
index 1f771cbb89bb290d9ef75b32528024d9481fa621..2a13ca050bbb8d980e9380c0a5599f2ac24b2441 100644 (file)
@@ -2635,7 +2635,7 @@ GC_INNER void GC_init_parallel(void)
     for (i = 0; i < THREAD_TABLE_SZ; ++i) {
       for (p = GC_threads[i]; 0 != p; p = p -> tm.next) {
 #       ifdef DEBUG_THREADS
-          GC_printf("Marking thread locals for 0x%x\n", p -> id);
+          GC_printf("Marking thread locals for 0x%x\n", (int)p -> id);
 #       endif
         GC_mark_thread_local_fls_for(&(p->tlfs));
       }