From c9dcca6a648aa4203e5381308dc0a89090e7f8bd Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Tue, 21 Mar 2023 19:51:10 -0700 Subject: [PATCH 1/2] update comments --- src/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os.c b/src/os.c index 3e8a9172..242a4eef 100644 --- a/src/os.c +++ b/src/os.c @@ -21,7 +21,7 @@ static mi_os_mem_config_t mi_os_mem_config = { 0, // large page size (usually 2MiB) 4096, // allocation granularity true, // has overcommit? (if true we use MAP_NORESERVE on mmap systems) - false // must free whole? + false // must free whole? (on mmap systems we can free anywhere in a mapped range, but on Windows we must free the entire span) }; bool _mi_os_has_overcommit(void) { From a21ddd03fe9dbc6b45f3fd502d695c96e23f3e8e Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Thu, 23 Mar 2023 11:21:45 -0700 Subject: [PATCH 2/2] add verbose message if thread sanitizer is enabled --- src/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index 0f4d4f40..565cffd9 100644 --- a/src/init.c +++ b/src/init.c @@ -527,11 +527,14 @@ void mi_process_init(void) mi_attr_noexcept { mi_detect_cpu_features(); _mi_os_init(); mi_heap_main_init(); - #if (MI_DEBUG) + #if MI_DEBUG _mi_verbose_message("debug level : %d\n", MI_DEBUG); #endif _mi_verbose_message("secure level: %d\n", MI_SECURE); _mi_verbose_message("mem tracking: %s\n", MI_TRACK_TOOL); + #if MI_TSAN + _mi_verbose_message("thread santizer enabled\n"); + #endif mi_thread_init(); #if defined(_WIN32)