mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
merge from dev
This commit is contained in:
commit
6568059cc6
19 changed files with 247 additions and 64 deletions
|
@ -13,7 +13,7 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
endif()
|
||||
|
||||
# Import mimalloc (if installed)
|
||||
find_package(mimalloc 1.0 REQUIRED NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
find_package(mimalloc 1.2 REQUIRED NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
message(STATUS "Found mimalloc installed at: ${MIMALLOC_TARGET_DIR}")
|
||||
|
||||
# overriding with a dynamic library
|
||||
|
|
|
@ -15,9 +15,9 @@ int main() {
|
|||
mi_version();
|
||||
|
||||
// detect double frees and heap corruption
|
||||
//double_free1();
|
||||
//double_free2();
|
||||
//corrupt_free();
|
||||
// double_free1();
|
||||
// double_free2();
|
||||
// corrupt_free();
|
||||
|
||||
void* p1 = malloc(78);
|
||||
void* p2 = malloc(24);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Testing allocators is difficult as bugs may only surface after particular
|
||||
allocation patterns. The main approach to testing _mimalloc_ is therefore
|
||||
to have extensive internal invariant checking (see `page_is_valid` in `page.c`
|
||||
for example), which is enabled in debug mode with `-DMI_CHECK_FULL=ON`.
|
||||
for example), which is enabled in debug mode with `-DMI_DEBUG_FULL=ON`.
|
||||
The main testing strategy is then to run [`mimalloc-bench`][bench] using full
|
||||
invariant checking to catch any potential problems over a wide range of intensive
|
||||
allocation benchmarks and programs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue