mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
updates to run valgrind on test-api
This commit is contained in:
parent
bc8f23aa0d
commit
eee7c40da5
8 changed files with 39 additions and 12 deletions
|
@ -931,7 +931,7 @@ static inline size_t mi_bsr(uintptr_t x) {
|
|||
// (AMD Zen3+ (~2020) or Intel Ice Lake+ (~2017). See also issue #201 and pr #253.
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#if !MI_TRACK_ENABLED && defined(_WIN32) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#include <intrin.h>
|
||||
#include <string.h>
|
||||
extern bool _mi_cpu_has_fsrm;
|
||||
|
|
|
@ -17,6 +17,9 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#define MI_VALGRIND 1
|
||||
|
||||
#if MI_VALGRIND
|
||||
|
||||
#define MI_TRACK_ENABLED 1
|
||||
|
||||
#include <valgrind/valgrind.h>
|
||||
#include <valgrind/memcheck.h>
|
||||
|
||||
|
@ -29,6 +32,8 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
|
||||
#else
|
||||
|
||||
#define MI_TRACK_ENABLED 0
|
||||
|
||||
#define mi_track_malloc(p,size,zero)
|
||||
#define mi_track_resize(p,oldsize,newsize)
|
||||
#define mi_track_free(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue