mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
set better default options for performance
This commit is contained in:
parent
0196622fff
commit
ea9dbd1036
5 changed files with 25 additions and 6 deletions
|
@ -314,10 +314,10 @@ void _mi_mem_free(void* p, size_t size, size_t id, mi_stats_t* stats) {
|
|||
// reset: 10x slowdown on malloc-large, decommit: 17x slowdown on malloc-large
|
||||
if (!mi_option_is_enabled(mi_option_large_os_pages)) {
|
||||
if (mi_option_is_enabled(mi_option_eager_region_commit)) {
|
||||
_mi_os_reset(p, size, stats); // 10x slowdown on malloc-large
|
||||
//_mi_os_reset(p, size, stats); // 10x slowdown on malloc-large
|
||||
}
|
||||
else {
|
||||
_mi_os_decommit(p, size, stats); // 17x slowdown on malloc-large
|
||||
//_mi_os_decommit(p, size, stats); // 17x slowdown on malloc-large
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ typedef struct mi_option_desc_s {
|
|||
static mi_option_desc_t options[_mi_option_last] = {
|
||||
{ 0, UNINIT, "page_reset" },
|
||||
{ 0, UNINIT, "cache_reset" },
|
||||
{ 0, UNINIT, "eager_commit" },
|
||||
{ 0, UNINIT, "eager_region_commit" },
|
||||
{ 1, UNINIT, "eager_commit" },
|
||||
{ 1, UNINIT, "eager_region_commit" },
|
||||
{ 0, UNINIT, "large_os_pages" }, // use large OS pages, use only with eager commit to prevent fragmentation of VMA's
|
||||
{ 0, UNINIT, "reset_decommits" },
|
||||
{ 0, UNINIT, "reset_discards" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue