mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
fix tests
This commit is contained in:
parent
886fd7d1b8
commit
05a75758dd
2 changed files with 14 additions and 14 deletions
|
@ -309,6 +309,10 @@ bool check_zero_init(uint8_t* p, size_t size) {
|
|||
|
||||
#if MI_DEBUG >= 2
|
||||
bool check_debug_fill_uninit(uint8_t* p, size_t size) {
|
||||
#if MI_VALGRIND
|
||||
(void)p; (void)size;
|
||||
return true; // when compiled with valgrind we don't init on purpose
|
||||
#else
|
||||
if(!p)
|
||||
return false;
|
||||
|
||||
|
@ -317,9 +321,14 @@ bool check_debug_fill_uninit(uint8_t* p, size_t size) {
|
|||
result &= p[i] == MI_DEBUG_UNINIT;
|
||||
}
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool check_debug_fill_freed(uint8_t* p, size_t size) {
|
||||
#if MI_VALGRIND
|
||||
(void)p; (void)size;
|
||||
return true; // when compiled with valgrind we don't fill on purpose
|
||||
#else
|
||||
if(!p)
|
||||
return false;
|
||||
|
||||
|
@ -328,5 +337,6 @@ bool check_debug_fill_freed(uint8_t* p, size_t size) {
|
|||
result &= p[i] == MI_DEBUG_FREED;
|
||||
}
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue