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);
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));
}
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);
void GC_print_back_graph_stats(void)
{
- GC_printf("Maximum backwards height of reachable objects at GC %lu is %ld\n",
+ GC_printf("Maximum backwards height of reachable objects at GC %lu is %lu\n",
(unsigned long) GC_gc_no, (unsigned long)GC_max_height);
if (GC_max_height > GC_max_max_height) {
GC_max_max_height = GC_max_height;
GC_INNER void GC_default_print_heap_obj_proc(ptr_t p)
{
ptr_t base = GC_base(p);
- GC_err_printf("start: %p, appr. length: %ld", base,
- (unsigned long)GC_size(base));
+ GC_err_printf("start: %p, appr. length: %lu",
+ base, (unsigned long)GC_size(base));
}
GC_INNER void (*GC_print_heap_obj)(ptr_t p) = GC_default_print_heap_obj_proc;
GC_incomplete_stack_bl = very_old_stack_bl;
GC_total_stack_black_listed = total_stack_black_listed();
if (GC_print_stats == VERBOSE)
- GC_log_printf("%ld bytes in heap blacklisted for interior pointers\n",
+ GC_log_printf("%lu bytes in heap blacklisted for interior pointers\n",
(unsigned long)GC_total_stack_black_listed);
if (GC_total_stack_black_listed != 0) {
GC_black_list_spacing =
GC_err_printf("list of finalizable objects\n\n");
goto out;
case GC_REFD_FROM_HEAP:
- GC_err_printf("offset %ld in object:\n", (unsigned long)offset);
+ GC_err_printf("offset %ld in object:\n", (long)offset);
/* Take GC_base(base) to get real base, i.e. header. */
GC_print_heap_obj(GC_base(base));
GC_err_printf("\n");
GC_err_printf("GC_debug_malloc(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%ld)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
GC_err_printf("GC_debug_malloc_ignore_off_page(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
GC_err_printf("GC_debug_malloc_atomic_ignore_off_page(%lu)"
" returning NULL (", (unsigned long)lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
GC_err_printf("GC_debug_malloc(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
GC_err_printf("GC_debug_malloc_atomic(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
GC_err_printf("GC_debug_malloc_uncollectable(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
"GC_debug_malloc_atomic_uncollectable(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
- GC_err_printf(":%lu)\n", (unsigned long)i);
+ GC_err_printf(":%d)\n", i);
return(0);
}
if (!GC_debugging_started) {
if (result == 0) {
GC_oom_func oom_fn = GC_oom_fn;
UNLOCK();
- GC_err_printf("GC_debug_gcj_malloc(%ld, %p) returning NULL (",
+ GC_err_printf("GC_debug_gcj_malloc(%lu, %p) returning NULL (",
(unsigned long)lb, ptr_to_struct_containing_descr);
GC_err_puts(s);
GC_err_printf(":%d)\n", i);
if (p == 0) return;
/* Required by ANSI. It's not my fault ... */
# ifdef LOG_ALLOCS
- GC_err_printf("GC_free(%p): %lu\n", p, (unsigned long)GC_gc_no);
+ GC_err_printf("GC_free(%p), GC: %lu\n", p, (unsigned long)GC_gc_no);
# endif
h = HBLKPTR(p);
hhdr = HDR(h);
# ifdef ENABLE_TRACE
if (GC_trace_addr >= current_p
&& GC_trace_addr < limit) {
- GC_log_printf("GC:%u Tracing from %p len %lu\n",
- (int)GC_gc_no, current_p, (unsigned long)descr);
+ GC_log_printf("GC:%u Tracing from %p, length is %lu\n",
+ (unsigned)GC_gc_no, current_p, (unsigned long)descr);
}
# endif /* ENABLE_TRACE */
/* The simple case in which we're scanning a range. */
GC_static_roots[i].r_tmp ? " (temporary)" : "");
total += GC_static_roots[i].r_end - GC_static_roots[i].r_start;
}
- GC_printf("Total size: %ld\n", (unsigned long) total);
+ GC_printf("Total size: %lu\n", (unsigned long) total);
if (GC_root_size != total) {
- GC_err_printf("GC_root_size incorrect: %ld!!\n",
- (long) GC_root_size);
+ GC_err_printf("GC_root_size incorrect: %lu!!\n",
+ (unsigned long) GC_root_size);
}
}
#endif /* !NO_DEBUGGING */
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)
- GC_log_printf("Allocated bytes:%lu:all pages may have been written\n",
+ GC_log_printf("Allocated %lu bytes: all pages may have been written\n",
(unsigned long)(GC_bytes_allocd
+ GC_bytes_allocd_before_gc));
}
GC_FAST_MALLOC_GRANS(result, granules, tiny_fl, DIRECT_GRANULES,
NORMAL, GC_core_malloc(bytes), obj_link(result)=0);
# ifdef LOG_ALLOCS
- GC_err_printf("GC_malloc(%u) = %p : %u\n",
- (unsigned)bytes, result, (unsigned)GC_gc_no);
+ GC_err_printf("GC_malloc(%lu) = %p, GC: %lu\n",
+ (unsigned long)bytes, result, (unsigned long)GC_gc_no);
# endif
return result;
}