mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
wip: improving tracking of allocation locations
This commit is contained in:
parent
21a95c7449
commit
2fbe0e8842
9 changed files with 393 additions and 447 deletions
|
@ -47,6 +47,15 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
void* operator new (std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_source_new_aligned_nothrow(n, static_cast<size_t>(al) MI_SOURCE_RET()); }
|
||||
void* operator new[](std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_source_new_aligned_nothrow(n, static_cast<size_t>(al) MI_SOURCE_RET()); }
|
||||
#endif
|
||||
|
||||
// Instances for debug override of the new operator
|
||||
#ifndef NDEBUG
|
||||
void* operator new(std::size_t n MI_SOURCE_PARAM) noexcept(false) { return mi_source_new(n MI_SOURCE_ARG); }
|
||||
void* operator new[](std::size_t n MI_SOURCE_PARAM) noexcept(false) { return mi_source_new(n MI_SOURCE_ARG); }
|
||||
|
||||
void operator delete(void* p MI_SOURCE_PARAM) noexcept { mi_free(p); };
|
||||
void operator delete[](void* p MI_SOURCE_PARAM) noexcept { mi_free(p); };
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // MIMALLOC_NEW_DELETE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue