Skip to content

Commit f4744bd

Browse files
committed
fix further annotation warnings for vs2022
1 parent 84126e8 commit f4744bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/mimalloc-internal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void* _mi_heap_malloc_zero(mi_heap_t* heap, size_t size, bool zero) mi_att
143143
void* _mi_heap_realloc_zero(mi_heap_t* heap, void* p, size_t newsize, bool zero) mi_attr_noexcept;
144144
mi_block_t* _mi_page_ptr_unalign(const mi_segment_t* segment, const mi_page_t* page, const void* p);
145145
bool _mi_free_delayed_block(mi_block_t* block);
146-
void _mi_block_zero_init(const mi_page_t* page, void* p, size_t size);
146+
void _mi_block_zero_init(const mi_page_t* page, void* p, size_t size);
147147

148148
#if MI_DEBUG>1
149149
bool _mi_page_is_valid(mi_page_t* page);
@@ -279,7 +279,9 @@ static inline bool mi_count_size_overflow(size_t count, size_t size, size_t* tot
279279
return false;
280280
}
281281
else if (mi_unlikely(mi_mul_overflow(count, size, total))) {
282+
#if !defined(NDEBUG)
282283
_mi_error_message(EOVERFLOW, "allocation request is too large (%zu * %zu bytes)\n", count, size);
284+
#endif
283285
*total = SIZE_MAX;
284286
return true;
285287
}

0 commit comments

Comments
 (0)