Skip to content

Commit ca0bac7

Browse files
committed
maintain backward compatible option order
1 parent f87cba9 commit ca0bac7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/mimalloc-internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ terms of the MIT license. A copy of the license can be found in the file
1919
#define MI_CACHE_LINE 64
2020
#if defined(_MSC_VER)
2121
#pragma warning(disable:4127) // suppress constant conditional warning (due to MI_SECURE paths)
22+
#pragma warning(disable:26812) // unscoped enum warning
2223
#define mi_decl_noinline __declspec(noinline)
2324
#define mi_decl_thread __declspec(thread)
2425
#define mi_decl_cache_align __declspec(align(MI_CACHE_LINE))

include/mimalloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ typedef enum mi_option_e {
321321
mi_option_reset_delay,
322322
mi_option_use_numa_nodes, // 0 = use available numa nodes, otherwise use at most N nodes.
323323
mi_option_limit_os_alloc, // 1 = do not use OS memory for allocation (but only reserved arenas)
324-
mi_option_max_segment_reclaim,
325324
mi_option_os_tag,
326325
mi_option_max_errors,
327326
mi_option_max_warnings,
327+
mi_option_max_segment_reclaim,
328328
_mi_option_last
329329
} mi_option_t;
330330

src/options.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ static mi_option_desc_t options[_mi_option_last] =
9090
{ 100, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds
9191
{ 0, UNINIT, MI_OPTION(use_numa_nodes) }, // 0 = use available numa nodes, otherwise use at most N nodes.
9292
{ 0, UNINIT, MI_OPTION(limit_os_alloc) }, // 1 = do not use OS memory for allocation (but only reserved arenas)
93-
{ 8, UNINIT, MI_OPTION(max_segment_reclaim)},// max. number of segment reclaims from the abandoned segments per try.
9493
{ 100, UNINIT, MI_OPTION(os_tag) }, // only apple specific for now but might serve more or less related purpose
9594
{ 16, UNINIT, MI_OPTION(max_errors) }, // maximum errors that are output
96-
{ 16, UNINIT, MI_OPTION(max_warnings) } // maximum warnings that are output
97-
95+
{ 16, UNINIT, MI_OPTION(max_warnings) }, // maximum warnings that are output
96+
{ 8, UNINIT, MI_OPTION(max_segment_reclaim)} // max. number of segment reclaims from the abandoned segments per try.
9897
};
9998

10099
static void mi_option_init(mi_option_desc_t* desc);

0 commit comments

Comments
 (0)