+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
# 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 */
# 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) \
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));
}