@@ -303,13 +303,13 @@ bool _mi_page_is_valid(mi_page_t* page);
303
303
#endif
304
304
305
305
306
- /* ----- ------------------------------------------------------
307
- Assertions
308
- ----------------------------------------------------------- */
306
+ // ------------------------------------------------------
307
+ // Assertions
308
+ // ------------------------------------------------------
309
309
310
310
#if (MI_DEBUG)
311
311
// 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 ;
313
313
#define mi_assert (expr ) ((expr) ? (void )0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
314
314
#else
315
315
#define mi_assert (x )
@@ -327,6 +327,7 @@ void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line
327
327
#define mi_assert_expensive (x )
328
328
#endif
329
329
330
+
330
331
/* -----------------------------------------------------------
331
332
Statistics (in `stats.c`)
332
333
----------------------------------------------------------- */
@@ -385,30 +386,6 @@ typedef struct mi_option_desc_s {
385
386
const char * legacy_name; // potential legacy option name
386
387
} mi_option_desc_t ;
387
388
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
-
412
389
413
390
414
391
/* -----------------------------------------------------------
0 commit comments