summaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-01-28 22:33:58 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-01-28 22:33:58 +0400
commit4cc17eb8fa505aa33c941dd19b78a411f32d2bd4 (patch)
tree420d651e1b0923b473ac172d231138c31f4f9fce /alloc.c
parent774560b0d6aeb5e77c7d7c634ffcc3fb6264fe3e (diff)
downloadbdwgc-4cc17eb8fa505aa33c941dd19b78a411f32d2bd4.tar.gz
Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
* alloc.c (GC_maybe_gc, GC_expand_hp_inner): Change printf "%ld" format specifier to "%lu" one according to printed value. * backgraph.c (GC_print_back_graph_stats): Likewise. * blacklst.c (GC_default_print_heap_obj_proc, GC_promote_black_lists): Likewise. * gcj_mlc.c (GC_debug_gcj_malloc): Likewise. * mark_rts.c (GC_print_static_roots): Likewise. * alloc.c (GC_stopped_mark): Correct logged GC number. * dbg_mlc.c (GC_print_backtrace): Cast printed value to proper type. * mark.c (GC_mark_from): Likewise. * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_stubborn, GC_debug_malloc_atomic, GC_debug_malloc_uncollectable): Change printf "%ld" format specifier for line number to "%d" one. * malloc.c (GC_free): Improve logged message (if LOG_ALLOCS). * thread_local_alloc.c (GC_malloc): Likewise. * os_dep.c (GC_dirty_init): Improve logged message (for VERBOSE level).
Diffstat (limited to 'alloc.c')
-rw-r--r--alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/alloc.c b/alloc.c
index 360463af..2d6d6bf6 100644
--- a/alloc.c
+++ b/alloc.c
@@ -365,8 +365,8 @@ STATIC void GC_maybe_gc(void)
if (GC_need_full_gc || n_partial_gcs >= GC_full_freq) {
if (GC_print_stats) {
GC_log_printf(
- "***>Full mark for collection %lu after %ld allocd bytes\n",
- (unsigned long)GC_gc_no + 1, (long)GC_bytes_allocd);
+ "***>Full mark for collection %lu after %lu allocd bytes\n",
+ (unsigned long)GC_gc_no + 1, (unsigned long)GC_bytes_allocd);
}
GC_promote_black_lists();
(void)GC_reclaim_all((GC_stop_func)0, TRUE);
@@ -646,7 +646,7 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func)
if (GC_print_stats) {
GC_log_printf("Collection %lu reclaimed %ld bytes ---> heapsize = %lu"
" bytes" IF_USE_MUNMAP(" (%lu unmapped)") "\n",
- (unsigned long)(GC_gc_no - 1), (long)GC_bytes_found,
+ (unsigned long)GC_gc_no, (long)GC_bytes_found,
(unsigned long)GC_heapsize /*, */
COMMA_IF_USE_MUNMAP((unsigned long)GC_unmapped_bytes));
}
@@ -1135,7 +1135,7 @@ GC_INNER GC_bool GC_expand_hp_inner(word n)
GC_add_to_our_memory((ptr_t)space, bytes);
if (space == 0) {
if (GC_print_stats) {
- GC_log_printf("Failed to expand heap by %ld bytes\n",
+ GC_log_printf("Failed to expand heap by %lu bytes\n",
(unsigned long)bytes);
}
return(FALSE);