Changeset 284895 in webkit
- Timestamp:
- Oct 26, 2021, 2:08:08 PM (5 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 30 edited
-
ChangeLog (modified) (1 diff)
-
libpas/src/libpas/pas_all_heaps.c (modified) (1 diff)
-
libpas/src/libpas/pas_bitfit_directory.c (modified) (2 diffs)
-
libpas/src/libpas/pas_bitfit_heap.c (modified) (1 diff)
-
libpas/src/libpas/pas_bitfit_page_inlines.h (modified) (4 diffs)
-
libpas/src/libpas/pas_commit_span.c (modified) (2 diffs)
-
libpas/src/libpas/pas_enumerate_large_heaps.c (modified) (2 diffs)
-
libpas/src/libpas/pas_fd_stream.c (modified) (1 diff)
-
libpas/src/libpas/pas_fd_stream.h (modified) (1 diff)
-
libpas/src/libpas/pas_hashtable.h (modified) (1 diff)
-
libpas/src/libpas/pas_large_map.c (modified) (2 diffs)
-
libpas/src/libpas/pas_large_sharing_pool.c (modified) (1 diff)
-
libpas/src/libpas/pas_local_allocator_inlines.h (modified) (3 diffs)
-
libpas/src/libpas/pas_log.c (modified) (1 diff)
-
libpas/src/libpas/pas_log.h (modified) (1 diff)
-
libpas/src/libpas/pas_page_sharing_pool.c (modified) (1 diff)
-
libpas/src/libpas/pas_segregated_directory_inlines.h (modified) (2 diffs)
-
libpas/src/libpas/pas_segregated_heap.c (modified) (1 diff)
-
libpas/src/libpas/pas_segregated_shared_page_directory.c (modified) (1 diff)
-
libpas/src/libpas/pas_segregated_shared_view.c (modified) (1 diff)
-
libpas/src/libpas/pas_segregated_view.c (modified) (3 diffs)
-
libpas/src/libpas/pas_status_reporter.c (modified) (3 diffs)
-
libpas/src/libpas/pas_stream.h (modified) (1 diff)
-
libpas/src/libpas/pas_string_stream.c (modified) (1 diff)
-
libpas/src/libpas/pas_string_stream.h (modified) (1 diff)
-
libpas/src/libpas/pas_thread_local_cache.c (modified) (1 diff)
-
libpas/src/libpas/pas_tiny_large_map_entry.h (modified) (2 diffs)
-
libpas/src/libpas/pas_try_allocate_common.h (modified) (2 diffs)
-
libpas/src/libpas/pas_try_allocate_intrinsic.h (modified) (1 diff)
-
libpas/src/libpas/pas_utils.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r284533 r284895 1 2021-10-26 David Kilzer <ddkilzer@apple.com> 2 3 [libpas] Add printf format attributes 4 <https://webkit.org/b/232291> 5 <rdar://problem/84643135> 6 7 Reviewed by Yusuke Suzuki. 8 9 Define PAS_FORMAT_PRINTF() macro in pas_utils.h, apply it to 10 functions that take format strings, then fix all the issues 11 found during compilation. 12 13 These changes also let us remove the clang pragma macros that 14 ignored -Wformat-nonliteral warnings in pas_log.c and 15 pas_string_stream.c. 16 17 * libpas/src/libpas/pas_all_heaps.c: 18 (verify_in_steady_state_segregated_directory_callback): 19 * libpas/src/libpas/pas_bitfit_directory.c: 20 (pas_bitfit_directory_take_last_empty): 21 * libpas/src/libpas/pas_bitfit_heap.c: 22 (pas_bitfit_heap_select_variant): 23 * libpas/src/libpas/pas_bitfit_page_inlines.h: 24 (pas_bitfit_page_allocate): 25 (pas_bitfit_page_deallocate_with_page_impl): 26 * libpas/src/libpas/pas_commit_span.c: 27 (pas_commit_span_construct): 28 (pas_commit_span_add_unchanged): 29 * libpas/src/libpas/pas_enumerate_large_heaps.c: 30 (record_span): 31 (pas_enumerate_large_heaps): 32 * libpas/src/libpas/pas_fd_stream.c: 33 (fd_stream_vprintf): 34 * libpas/src/libpas/pas_fd_stream.h: 35 * libpas/src/libpas/pas_hashtable.h: 36 * libpas/src/libpas/pas_large_map.c: 37 (pas_large_map_add): 38 (pas_large_map_take): 39 * libpas/src/libpas/pas_large_sharing_pool.c: 40 (validate_min_heap): 41 * libpas/src/libpas/pas_local_allocator_inlines.h: 42 (pas_local_allocator_scan_bits_to_set_up_free_bits): 43 (pas_local_allocator_return_memory_to_page): 44 (pas_local_allocator_try_allocate_inline_cases): 45 * libpas/src/libpas/pas_log.c: 46 * libpas/src/libpas/pas_log.h: 47 * libpas/src/libpas/pas_page_sharing_pool.c: 48 (pas_page_sharing_pool_add_at_index): 49 * libpas/src/libpas/pas_segregated_directory_inlines.h: 50 (pas_segregated_directory_iterate_iterate_callback): 51 (pas_segregated_directory_iterate_forward): 52 * libpas/src/libpas/pas_segregated_heap.c: 53 (pas_segregated_heap_ensure_size_directory_for_count): 54 * libpas/src/libpas/pas_segregated_shared_page_directory.c: 55 (pas_segregated_shared_page_directory_find_first_eligible): 56 * libpas/src/libpas/pas_segregated_shared_view.c: 57 (compute_summary): 58 * libpas/src/libpas/pas_segregated_view.c: 59 (for_each_live_object): 60 (should_be_eligible): 61 * libpas/src/libpas/pas_status_reporter.c: 62 (pas_status_reporter_dump_large_map): 63 * libpas/src/libpas/pas_stream.h: 64 * libpas/src/libpas/pas_string_stream.c: 65 (string_stream_vprintf): 66 * libpas/src/libpas/pas_string_stream.h: 67 * libpas/src/libpas/pas_thread_local_cache.c: 68 (suspend): 69 * libpas/src/libpas/pas_tiny_large_map_entry.h: 70 (pas_tiny_large_map_entry_can_create): 71 * libpas/src/libpas/pas_try_allocate_common.h: 72 (pas_try_allocate_common_impl_fast): 73 (pas_try_allocate_common_impl_slow): 74 * libpas/src/libpas/pas_try_allocate_intrinsic.h: 75 * libpas/src/libpas/pas_utils.h: 76 1 77 2021-10-20 Michael Catanzaro <mcatanzaro@gnome.org> 2 78 -
trunk/Source/bmalloc/libpas/src/libpas/pas_all_heaps.c
r282556 r284895 368 368 dump_directory_nicely(directory); 369 369 dump_view_nicely(index, view); 370 pas_log(": didn't expect it to be empty.\n", 371 index, view); 370 pas_log(": didn't expect it to be empty.\n"); 372 371 PAS_ASSERT(!is_empty); 373 372 } -
trunk/Source/bmalloc/libpas/src/libpas/pas_bitfit_directory.c
r283178 r284895 438 438 owns it while holding the lock. Newly created pages start out empty. */ 439 439 if (max_free != PAS_BITFIT_MAX_FREE_EMPTY) { 440 pas_log("%p:% u: found non-empty page that is dead when taking last empty.\n");440 pas_log("%p:%zu: found non-empty page that is dead when taking last empty.\n", page, index); 441 441 PAS_ASSERT(max_free == PAS_BITFIT_MAX_FREE_EMPTY); 442 442 } … … 445 445 lock. */ 446 446 if (max_free == PAS_BITFIT_MAX_FREE_EMPTY) { 447 pas_log("%p:% u: found empty page that is not dead when taking last empty.\n");447 pas_log("%p:%zu: found empty page that is not dead when taking last empty.\n", page, index); 448 448 PAS_ASSERT(max_free != PAS_BITFIT_MAX_FREE_EMPTY); 449 449 } -
trunk/Source/bmalloc/libpas/src/libpas/pas_bitfit_heap.c
r282556 r284895 84 84 85 85 if (verbose) 86 pas_log("max object size = % u\n", page_config.base.max_object_size);86 pas_log("max object size = %zu\n", page_config.base.max_object_size); 87 87 88 88 PAS_ASSERT( -
trunk/Source/bmalloc/libpas/src/libpas/pas_bitfit_page_inlines.h
r282556 r284895 370 370 if (verbose) { 371 371 pas_log("Need to do a search starting at word_index = %lu + 1, " 372 "num_remaining_needed_bits = %l u\n",372 "num_remaining_needed_bits = %llu\n", 373 373 word_index, num_remaining_needed_bits); 374 374 } … … 384 384 385 385 if (verbose) { 386 pas_log("At other_word_index = %lu, num_remaining_needed_bits = %l u\n",386 pas_log("At other_word_index = %lu, num_remaining_needed_bits = %llu\n", 387 387 other_word_index, num_remaining_needed_bits); 388 388 } … … 797 797 free_words[intermediate_word_index] = UINT64_MAX; 798 798 if (verbose) { 799 pas_log("object_end_bit_index = %l u, mask = %llu\n",799 pas_log("object_end_bit_index = %llu, mask = %llu\n", 800 800 object_end_bit_index, pas_make_mask64(object_end_bit_index + 1)); 801 801 } … … 805 805 if (verbose) { 806 806 pas_log("word_index = %lu, bit_index_in_word = %lu, other_word_index = %lu, " 807 "object_end_bit_index = %l u\n",807 "object_end_bit_index = %llu\n", 808 808 word_index, bit_index_in_word, other_word_index, object_end_bit_index); 809 809 } -
trunk/Source/bmalloc/libpas/src/libpas/pas_commit_span.c
r279867 r284895 40 40 { 41 41 if (verbose) 42 pas_log("%p: creating commit span.\n" );42 pas_log("%p: creating commit span.\n", span); 43 43 span->index_of_start_of_span = UINTPTR_MAX; 44 44 span->did_add_first = false; … … 67 67 68 68 if (verbose) 69 pas_log("%p: adding a thing.\n" );69 pas_log("%p: adding a thing.\n", span); 70 70 71 71 PAS_ASSERT(span->index_of_start_of_span < granule_index); -
trunk/Source/bmalloc/libpas/src/libpas/pas_enumerate_large_heaps.c
r282556 r284895 54 54 static const bool verbose = false; 55 55 if (verbose) 56 pas_log("record_span: %p...%p\n", range.begin,range.end);56 pas_log("record_span: %p...%p\n", (void*)range.begin, (void*)range.end); 57 57 pas_enumerator_record( 58 58 enumerator, (void*)range.begin, pas_range_size(range), pas_enumerator_payload_record); … … 141 141 142 142 if (verbose) 143 pas_log("Looking at page %p\n", page);143 pas_log("Looking at page %p\n", (void*)page); 144 144 145 145 if (!pas_enumerator_exclude_accounted_page(enumerator, (void*)page)) -
trunk/Source/bmalloc/libpas/src/libpas/pas_fd_stream.c
r279867 r284895 32 32 #include "pas_log.h" 33 33 34 static void fd_stream_vprintf(pas_stream* stream, const char* format, va_list arg_list)34 static PAS_FORMAT_PRINTF(2, 0) void fd_stream_vprintf(pas_stream* stream, const char* format, va_list arg_list) 35 35 { 36 36 pas_fd_stream_vprintf((pas_fd_stream*)stream, format, arg_list); -
trunk/Source/bmalloc/libpas/src/libpas/pas_fd_stream.h
r279867 r284895 50 50 PAS_API void pas_fd_stream_construct(pas_fd_stream* stream, int fd); 51 51 52 PAS_API void pas_fd_stream_vprintf(pas_fd_stream* stream, const char* format, va_list arg_list) ;52 PAS_API void pas_fd_stream_vprintf(pas_fd_stream* stream, const char* format, va_list arg_list) PAS_FORMAT_PRINTF(2, 0); 53 53 54 54 #define pas_fd_stream_printf(stream, ...) \ -
trunk/Source/bmalloc/libpas/src/libpas/pas_hashtable.h
r279867 r284895 113 113 new_byte_size = (size_t)new_size * sizeof(entry_type); \ 114 114 if (verbose) \ 115 pas_log("Allocating a new table with new_size = % zu, new_byte_size = %zu.\n", new_size, new_byte_size); \115 pas_log("Allocating a new table with new_size = %u, new_byte_size = %zu.\n", new_size, new_byte_size); \ 116 116 new_table = (entry_type*)allocation_config->allocate( \ 117 117 new_byte_size, #name "/table", pas_object_allocation, allocation_config->arg); \ -
trunk/Source/bmalloc/libpas/src/libpas/pas_large_map.c
r279867 r284895 93 93 94 94 if (verbose) 95 pas_log("adding base = %p.\n", tiny_base);95 pas_log("adding base = %p.\n", (void*)tiny_base); 96 96 97 97 add_result = pas_tiny_large_map_hashtable_add( … … 160 160 tiny_base = pas_tiny_large_map_entry_base(begin); 161 161 if (verbose) 162 pas_log("tiny_base = %p.\n", tiny_base);162 pas_log("tiny_base = %p.\n", (void*)tiny_base); 163 163 first_level_tiny_entry = pas_tiny_large_map_hashtable_find( 164 164 &pas_tiny_large_map_hashtable_instance, tiny_base); -
trunk/Source/bmalloc/libpas/src/libpas/pas_large_sharing_pool.c
r284208 r284895 121 121 122 122 if (verbose) { 123 pas_log(" % zu:%p:%lu-%lu:%llu",123 pas_log(" %d:%p:%lu-%lu:%llu", 124 124 node->index_in_min_heap, 125 125 node, node->range.begin, node->range.end, -
trunk/Source/bmalloc/libpas/src/libpas/pas_local_allocator_inlines.h
r282899 r284895 162 162 163 163 if (verbose) { 164 pas_log("%p, %s: Setting up alloc bits in range % zu...%zu\n",164 pas_log("%p, %s: Setting up alloc bits in range %u...%u\n", 165 165 allocator, 166 166 pas_local_allocator_config_kind_get_string(allocator->config_kind), … … 1289 1289 1290 1290 if (verbose) { 1291 pas_log("Full alloc bits have range % zu...%zu\n",1291 pas_log("Full alloc bits have range %u...%u\n", 1292 1292 full_alloc_bits.word_index_begin, 1293 1293 full_alloc_bits.word_index_end); … … 1454 1454 1455 1455 if (verbose) 1456 pas_log("payload_end = %p\n", allocator->payload_end);1456 pas_log("payload_end = %p\n", (void*)allocator->payload_end); 1457 1457 1458 1458 PAS_TESTING_ASSERT(allocator->payload_end); -
trunk/Source/bmalloc/libpas/src/libpas/pas_log.c
r282556 r284895 33 33 #include "pas_snprintf.h" 34 34 #include <unistd.h> 35 36 #pragma clang diagnostic push37 #pragma clang diagnostic ignored "-Wformat-nonliteral"38 35 39 36 pthread_t pas_thread_that_is_crash_logging; -
trunk/Source/bmalloc/libpas/src/libpas/pas_log.h
r279867 r284895 42 42 PAS_LOG_MAX_BYTES at a time. */ 43 43 44 PAS_API void pas_vlog_fd(int fd, const char* format, va_list) ;45 PAS_API void pas_log_fd(int fd, const char* format, ...) ;44 PAS_API void pas_vlog_fd(int fd, const char* format, va_list) PAS_FORMAT_PRINTF(2, 0); 45 PAS_API void pas_log_fd(int fd, const char* format, ...) PAS_FORMAT_PRINTF(2, 3); 46 46 47 PAS_API void pas_vlog(const char* format, va_list) ;48 PAS_API void pas_log(const char* format, ...) ;47 PAS_API void pas_vlog(const char* format, va_list) PAS_FORMAT_PRINTF(1, 0); 48 PAS_API void pas_log(const char* format, ...) PAS_FORMAT_PRINTF(1, 2); 49 49 50 50 PAS_API void pas_start_crash_logging(void); -
trunk/Source/bmalloc/libpas/src/libpas/pas_page_sharing_pool.c
r282556 r284895 234 234 pas_log("Adding participant %p to pool %p (%s), index = %zu.\n", 235 235 participant, 236 pool, 236 237 pas_page_sharing_participant_kind_get_string( 237 238 pas_page_sharing_participant_get_kind(participant)), 238 pool,239 239 index_in_sharing_pool); 240 240 } -
trunk/Source/bmalloc/libpas/src/libpas/pas_segregated_directory_inlines.h
r282556 r284895 117 117 if (config->first_considered == SIZE_MAX) { 118 118 if (verbose) 119 pas_log("%p: setting first_considered to 0\n", config->directory, config->index);119 pas_log("%p: setting first_considered to %zu\n", config->directory, config->index); 120 120 config->first_considered = config->index; 121 121 } else { … … 182 182 if (verbose) { 183 183 pas_log("Actually using segmented bitvector iteration.\n"); 184 pas_log("Segmented bitvector size = % zu\n", data->bitvectors.size);184 pas_log("Segmented bitvector size = %u\n", data->bitvectors.size); 185 185 } 186 186 found_index = pas_segregated_directory_segmented_bitvectors_iterate( -
trunk/Source/bmalloc/libpas/src/libpas/pas_segregated_heap.c
r282556 r284895 1256 1256 if (candidate) { 1257 1257 if (verbose) 1258 pas_log("Have candidate with size = % zu\n", candidate->object_size);1258 pas_log("Have candidate with size = %d\n", candidate->object_size); 1259 1259 1260 1260 /* If the candidate at this index has an object size that is no larger than the -
trunk/Source/bmalloc/libpas/src/libpas/pas_segregated_shared_page_directory.c
r282556 r284895 129 129 130 130 if (verbose) 131 pas_log("trying to allocate size = % zu, alignment = %zu.\n", size, alignment);131 pas_log("trying to allocate size = %u, alignment = %u.\n", size, alignment); 132 132 133 133 data.size = size; -
trunk/Source/bmalloc/libpas/src/libpas/pas_segregated_shared_view.c
r282556 r284895 269 269 270 270 if (verbose) 271 pas_log("index = % zu, bump_offset = %lu/%lu.\n", view->index, end_of_payload, end_of_page);271 pas_log("index = %d, bump_offset = %lu/%lu.\n", view->index, end_of_payload, end_of_page); 272 272 273 273 PAS_ASSERT(start_of_payload >= start_of_page); -
trunk/Source/bmalloc/libpas/src/libpas/pas_segregated_view.c
r282556 r284895 371 371 372 372 if (verbose) { 373 pas_log("page = %p, got alloc bits range % zu...%zu.\n",373 pas_log("page = %p, got alloc bits range %u...%u.\n", 374 374 page, 375 375 full_alloc_bits.word_index_begin, … … 462 462 if (verbose) { 463 463 pas_log("Checking if can bump for shared view %p, bump %u, max object size %zu, " 464 "bump limit % u\n",464 "bump limit %zu\n", 465 465 shared_view, shared_view->bump_offset, page_config->base.max_object_size, 466 466 pas_segregated_page_config_object_payload_end_offset_from_boundary(*page_config)); … … 484 484 485 485 if (verbose) { 486 pas_log("page = %p, got alloc bits range % zu...%zu.\n",486 pas_log("page = %p, got alloc bits range %u...%u.\n", 487 487 page, 488 488 full_alloc_bits.word_index_begin, -
trunk/Source/bmalloc/libpas/src/libpas/pas_status_reporter.c
r283178 r284895 419 419 pas_stream_printf( 420 420 stream, 421 " Tiny Map: Num Entries: % zu, Num Deleted: %zu, Table Size: %zu\n",421 " Tiny Map: Num Entries: %u, Num Deleted: %u, Table Size: %u\n", 422 422 pas_tiny_large_map_hashtable_instance.key_count, 423 423 pas_tiny_large_map_hashtable_instance.deleted_count, … … 425 425 pas_stream_printf( 426 426 stream, 427 " Small Fallback Map: Num Entries: % zu, Num Deleted: %zu, Table Size: %zu\n",427 " Small Fallback Map: Num Entries: %u, Num Deleted: %u, Table Size: %u\n", 428 428 pas_small_large_map_hashtable_instance.key_count, 429 429 pas_small_large_map_hashtable_instance.deleted_count, … … 431 431 pas_stream_printf( 432 432 stream, 433 " Fallback Map: Num Entries: % zu, Num Deleted: %zu, Table Size: %zu\n",433 " Fallback Map: Num Entries: %u, Num Deleted: %u, Table Size: %u\n", 434 434 pas_large_map_hashtable_instance.key_count, 435 435 pas_large_map_hashtable_instance.deleted_count, -
trunk/Source/bmalloc/libpas/src/libpas/pas_stream.h
r279867 r284895 44 44 45 45 struct pas_stream_functions { 46 void (*vprintf)(pas_stream* stream, const char* format, va_list arg_list);46 void (*vprintf)(pas_stream* stream, const char* format, va_list) PAS_FORMAT_PRINTF(2, 0); 47 47 }; 48 48 49 49 #define PAS_STREAM_INITIALIZER(passed_functions) { .functions = (passed_functions) } 50 50 51 PAS_API void pas_stream_vprintf(pas_stream* stream, const char* format, va_list) ;52 PAS_API void pas_stream_printf(pas_stream* stream, const char* format, ...) ;51 PAS_API void pas_stream_vprintf(pas_stream* stream, const char* format, va_list) PAS_FORMAT_PRINTF(2, 0); 52 PAS_API void pas_stream_printf(pas_stream* stream, const char* format, ...) PAS_FORMAT_PRINTF(2, 3); 53 53 54 54 static inline void pas_stream_print_comma(pas_stream* stream, bool* comma, const char* string) -
trunk/Source/bmalloc/libpas/src/libpas/pas_string_stream.c
r282556 r284895 33 33 #include "pas_snprintf.h" 34 34 35 #pragma clang diagnostic push 36 #pragma clang diagnostic ignored "-Wformat-nonliteral" 37 38 static void string_stream_vprintf(pas_stream* stream, const char* format, va_list arg_list) 35 static PAS_FORMAT_PRINTF(2, 0) void string_stream_vprintf(pas_stream* stream, const char* format, va_list arg_list) 39 36 { 40 37 pas_string_stream_vprintf((pas_string_stream*)stream, format, arg_list); -
trunk/Source/bmalloc/libpas/src/libpas/pas_string_stream.h
r279867 r284895 52 52 PAS_API void pas_string_stream_reset(pas_string_stream* stream); 53 53 54 PAS_API void pas_string_stream_vprintf(pas_string_stream* stream, const char* format, va_list) ;54 PAS_API void pas_string_stream_vprintf(pas_string_stream* stream, const char* format, va_list) PAS_FORMAT_PRINTF(2, 0); 55 55 56 56 #define pas_string_stream_printf(stream, ...) \ -
trunk/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c
r282899 r284895 556 556 557 557 if (result != KERN_SUCCESS) { 558 pas_log("[%d] Failed to suspend pthread %p (mach thread % p) associated with TLC %p: %d\n",558 pas_log("[%d] Failed to suspend pthread %p (mach thread %d) associated with TLC %p: %d\n", 559 559 getpid(), thread, mach_thread, cache, result); 560 560 dump_thread_diagnostics(thread); -
trunk/Source/bmalloc/libpas/src/libpas/pas_tiny_large_map_entry.h
r279867 r284895 114 114 base = pas_tiny_large_map_entry_base(entry.begin); 115 115 if (verbose) 116 pas_log("base = %p.\n", base);116 pas_log("base = %p.\n", (void*)base); 117 117 result = pas_tiny_large_map_entry_create(entry); 118 118 if (verbose) { … … 124 124 (unsigned)result.bytes[4]); 125 125 pas_log("round tripped: %p...%p, heap = %p.\n", 126 pas_tiny_large_map_entry_begin(result, base),127 pas_tiny_large_map_entry_end(result, base),128 pas_tiny_large_map_entry_heap(result));126 (void*)pas_tiny_large_map_entry_begin(result, base), 127 (void*)pas_tiny_large_map_entry_end(result, base), 128 (void*)pas_tiny_large_map_entry_heap(result)); 129 129 } 130 130 return entry.begin == pas_tiny_large_map_entry_begin(result, base) -
trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h
r282899 r284895 75 75 result_filter); 76 76 if (verbose) 77 pas_log("in common - result.begin = %p\n", result.begin);77 pas_log("in common - result.begin = %p\n", (void*)result.begin); 78 78 return result; 79 79 } … … 113 113 result = pas_debug_heap_allocate(size, alignment); 114 114 if (verbose) 115 pas_log("Got result.ptr = %p, did_succeed = %d\n", result.begin, result.did_succeed);115 pas_log("Got result.ptr = %p, did_succeed = %d\n", (void*)result.begin, result.did_succeed); 116 116 return result; 117 117 } -
trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h
r283371 r284895 322 322 pas_allocation_result result = name(size, 1); \ 323 323 if (verbose) \ 324 pas_log("result.begin = %p\n", result.begin); \324 pas_log("result.begin = %p\n", (void*)result.begin); \ 325 325 return result; \ 326 326 } \ -
trunk/Source/bmalloc/libpas/src/libpas/pas_utils.h
r282556 r284895 69 69 #define PAS_ALIGNED(amount) __attribute__((aligned(amount))) 70 70 71 #define PAS_FORMAT_PRINTF(fmt, args) __attribute__((format(__printf__, fmt, args))) 72 71 73 #define PAS_UNUSED __attribute__((unused)) 72 74 … … 83 85 84 86 /* NOTE: panic format string must have \n at the end. */ 85 PAS_API PAS_NO_RETURN void pas_panic(const char* format, ...) ;87 PAS_API PAS_NO_RETURN void pas_panic(const char* format, ...) PAS_FORMAT_PRINTF(1, 2); 86 88 87 89 #define pas_set_deallocation_did_fail_callback __pas_set_deallocation_did_fail_callback
Note:
See TracChangeset
for help on using the changeset viewer.