mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
restore to old-style windows override; fix debug mode
This commit is contained in:
commit
dd79b662f8
5 changed files with 23 additions and 9 deletions
|
@ -143,7 +143,11 @@ static size_t mi__msize_term(void* p) {
|
|||
}
|
||||
|
||||
|
||||
// Debug versions, forward to base versions (that get patched)
|
||||
// Debug versions, forward to base versions in ucrtbase (that get patched)
|
||||
void* _malloc_base(size_t size);
|
||||
void* _calloc_base(size_t size, size_t count);
|
||||
void* _realloc_base(void* p, size_t new_size);
|
||||
void _free_base(void* p);
|
||||
|
||||
static void* mi__malloc_dbg(size_t size, int block_type, const char* fname, int line) {
|
||||
UNUSED(block_type); UNUSED(fname); UNUSED(line);
|
||||
|
|
|
@ -9,7 +9,7 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#error "this file should be included from 'alloc.c' (so aliases can work)"
|
||||
#endif
|
||||
|
||||
#if defined(MI_MALLOC_OVERRIDE) && defined(_WIN32) && !(defined(MI_SHARED_LIB) && defined(_DLL) && defined(_WIN64))
|
||||
#if defined(MI_MALLOC_OVERRIDE) && defined(_WIN32) && !(defined(MI_SHARED_LIB) && defined(_DLL))
|
||||
#error "It is only possible to override "malloc" on Windows when building as a 64-bit DLL (and linking the C runtime as a DLL)"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ bool _mi_preloading() {
|
|||
}
|
||||
|
||||
// Communicate with the redirection module on Windows
|
||||
#if defined(_WIN32) && defined(MI_SHARED_LIB)
|
||||
#if defined(_WIN32) && defined(XMI_SHARED_LIB)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue