Skip to content

Commit c8c325c

Browse files
committed
fix merge error
1 parent 5115ddd commit c8c325c

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

include/mimalloc/internal.h

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,13 @@ bool _mi_page_is_valid(mi_page_t* page);
303303
#endif
304304

305305

306-
/* -----------------------------------------------------------
307-
Assertions
308-
----------------------------------------------------------- */
306+
// ------------------------------------------------------
307+
// Assertions
308+
// ------------------------------------------------------
309309

310310
#if (MI_DEBUG)
311311
// use our own assertion to print without memory allocation
312-
void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func);
312+
mi_decl_noreturn mi_decl_cold void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func) mi_attr_noexcept;
313313
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
314314
#else
315315
#define mi_assert(x)
@@ -327,6 +327,7 @@ void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line
327327
#define mi_assert_expensive(x)
328328
#endif
329329

330+
330331
/* -----------------------------------------------------------
331332
Statistics (in `stats.c`)
332333
----------------------------------------------------------- */
@@ -385,30 +386,6 @@ typedef struct mi_option_desc_s {
385386
const char* legacy_name; // potential legacy option name
386387
} mi_option_desc_t;
387388

388-
// ------------------------------------------------------
389-
// Assertions
390-
// ------------------------------------------------------
391-
392-
#if (MI_DEBUG)
393-
// use our own assertion to print without memory allocation
394-
mi_decl_noreturn mi_decl_cold void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func) mi_attr_noexcept;
395-
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
396-
#else
397-
#define mi_assert(x)
398-
#endif
399-
400-
#if (MI_DEBUG>1)
401-
#define mi_assert_internal mi_assert
402-
#else
403-
#define mi_assert_internal(x)
404-
#endif
405-
406-
#if (MI_DEBUG>2)
407-
#define mi_assert_expensive mi_assert
408-
#else
409-
#define mi_assert_expensive(x)
410-
#endif
411-
412389

413390

414391
/* -----------------------------------------------------------

0 commit comments

Comments
 (0)