mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-01 09:14:38 +03:00
fix merge error
This commit is contained in:
parent
5115ddd6e6
commit
c8c325c8cd
1 changed files with 5 additions and 28 deletions
|
@ -303,13 +303,13 @@ bool _mi_page_is_valid(mi_page_t* page);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
Assertions
|
// Assertions
|
||||||
----------------------------------------------------------- */
|
// ------------------------------------------------------
|
||||||
|
|
||||||
#if (MI_DEBUG)
|
#if (MI_DEBUG)
|
||||||
// use our own assertion to print without memory allocation
|
// use our own assertion to print without memory allocation
|
||||||
void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func);
|
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;
|
||||||
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
|
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
|
||||||
#else
|
#else
|
||||||
#define mi_assert(x)
|
#define mi_assert(x)
|
||||||
|
@ -327,6 +327,7 @@ void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line
|
||||||
#define mi_assert_expensive(x)
|
#define mi_assert_expensive(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
/* -----------------------------------------------------------
|
||||||
Statistics (in `stats.c`)
|
Statistics (in `stats.c`)
|
||||||
----------------------------------------------------------- */
|
----------------------------------------------------------- */
|
||||||
|
@ -385,30 +386,6 @@ typedef struct mi_option_desc_s {
|
||||||
const char* legacy_name; // potential legacy option name
|
const char* legacy_name; // potential legacy option name
|
||||||
} mi_option_desc_t;
|
} mi_option_desc_t;
|
||||||
|
|
||||||
// ------------------------------------------------------
|
|
||||||
// Assertions
|
|
||||||
// ------------------------------------------------------
|
|
||||||
|
|
||||||
#if (MI_DEBUG)
|
|
||||||
// use our own assertion to print without memory allocation
|
|
||||||
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;
|
|
||||||
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
|
|
||||||
#else
|
|
||||||
#define mi_assert(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (MI_DEBUG>1)
|
|
||||||
#define mi_assert_internal mi_assert
|
|
||||||
#else
|
|
||||||
#define mi_assert_internal(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (MI_DEBUG>2)
|
|
||||||
#define mi_assert_expensive mi_assert
|
|
||||||
#else
|
|
||||||
#define mi_assert_expensive(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
/* -----------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue