mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
Merge branch 'dev' into dev-platform
This commit is contained in:
commit
2e85af5bb2
1 changed files with 3 additions and 2 deletions
|
@ -271,7 +271,7 @@ int main(void) {
|
||||||
mi_free(p);
|
mi_free(p);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !(MI_TRACK_VALGRIND || MI_TRACK_ASAN)
|
||||||
CHECK_BODY("fill-freed-small") {
|
CHECK_BODY("fill-freed-small") {
|
||||||
size_t malloc_size = MI_SMALL_SIZE_MAX / 2;
|
size_t malloc_size = MI_SMALL_SIZE_MAX / 2;
|
||||||
uint8_t* p = (uint8_t*)mi_malloc(malloc_size);
|
uint8_t* p = (uint8_t*)mi_malloc(malloc_size);
|
||||||
|
@ -287,6 +287,7 @@ int main(void) {
|
||||||
result = check_debug_fill_freed(p + sizeof(void*), malloc_size - sizeof(void*));
|
result = check_debug_fill_freed(p + sizeof(void*), malloc_size - sizeof(void*));
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
// Done
|
// Done
|
||||||
|
@ -309,7 +310,7 @@ bool check_zero_init(uint8_t* p, size_t size) {
|
||||||
|
|
||||||
#if MI_DEBUG >= 2
|
#if MI_DEBUG >= 2
|
||||||
bool check_debug_fill_uninit(uint8_t* p, size_t size) {
|
bool check_debug_fill_uninit(uint8_t* p, size_t size) {
|
||||||
#if MI_TRACK_VALGRIND
|
#if MI_TRACK_VALGRIND || MI_TRACK_ASAN
|
||||||
(void)p; (void)size;
|
(void)p; (void)size;
|
||||||
return true; // when compiled with valgrind we don't init on purpose
|
return true; // when compiled with valgrind we don't init on purpose
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue