From d102882bdf34ce1fadf224c3d3ef954c6c79cbec Mon Sep 17 00:00:00 2001 From: daan Date: Mon, 20 Apr 2020 17:59:13 -0700 Subject: [PATCH 1/3] bump version to 1.6.2 --- include/mimalloc.h | 10 +++++----- readme.md | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/mimalloc.h b/include/mimalloc.h index b99b668a..dcd87c40 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_H #define MIMALLOC_H -#define MI_MALLOC_VERSION 161 // major + 2 digits minor +#define MI_MALLOC_VERSION 162 // major + 2 digits minor // ------------------------------------------------------ // Compiler specific attributes @@ -28,11 +28,11 @@ terms of the MIT license. A copy of the license can be found in the file #define mi_decl_nodiscard [[nodiscard]] #elif (__GNUC__ >= 4) || defined(__clang__) // includes clang, icc, and clang-cl #define mi_decl_nodiscard __attribute__((warn_unused_result)) -#elif (_MSC_VER >= 1700) +#elif (_MSC_VER >= 1700) #define mi_decl_nodiscard _Check_return_ -#else - #define mi_decl_nodiscard -#endif +#else + #define mi_decl_nodiscard +#endif #if defined(_MSC_VER) || defined(__MINGW32__) #if !defined(MI_SHARED_LIB) diff --git a/readme.md b/readme.md index 718d5e70..583d54ed 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,7 @@ mimalloc (pronounced "me-malloc") is a general purpose allocator with excellent [performance](#performance) characteristics. Initially developed by Daan Leijen for the run-time systems of the [Koka](https://github.com/koka-lang/koka) and [Lean](https://github.com/leanprover/lean) languages. -Latest release:`v1.6.1` (2020-02-17). +Latest release:`v1.6.2` (2020-04-20). It is a drop-in replacement for `malloc` and can be used in other programs without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as: @@ -57,6 +57,9 @@ Enjoy! ### Releases +* 2020-04-20, `v1.6.2`: stable release 1.6: fix compilation on Android, MingW, Raspberry, and Conda, + stability fix for Windows 7, fix multiple mimalloc instances in one executable, fix `strnlen` overload, + fix aligned debug padding. * 2020-02-17, `v1.6.1`: stable release 1.6: minor updates (build with clang-cl, fix alignment issue for small objects). * 2020-02-09, `v1.6.0`: stable release 1.6: fixed potential memory leak, improved overriding and thread local support on FreeBSD, NetBSD, DragonFly, and macOSX. New byte-precise From 3484cda1698fc9b7142be62f3d5d09bc05a939b9 Mon Sep 17 00:00:00 2001 From: daan Date: Mon, 20 Apr 2020 18:01:39 -0700 Subject: [PATCH 2/3] bump version to 1.6.3 for further development --- include/mimalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mimalloc.h b/include/mimalloc.h index dcd87c40..28d6d1b7 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_H #define MIMALLOC_H -#define MI_MALLOC_VERSION 162 // major + 2 digits minor +#define MI_MALLOC_VERSION 163 // major + 2 digits minor // ------------------------------------------------------ // Compiler specific attributes From e31298bdc3beb1cddedff1210f3e7d2bd34d2e1f Mon Sep 17 00:00:00 2001 From: daan Date: Mon, 20 Apr 2020 18:04:09 -0700 Subject: [PATCH 3/3] fix compiler warning in secure mode --- src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 90a1f461..607d15b6 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -650,7 +650,7 @@ mi_decl_restrict char* mi_strdup(const char* s) mi_attr_noexcept { mi_decl_restrict char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n) mi_attr_noexcept { if (s == NULL) return NULL; const char* end = (const char*)memchr(s, 0, n); // find end of string in the first `n` characters (returns NULL if not found) - const size_t m = (end != NULL ? (end - s) : n); // `m` is the minimum of `n` or the end-of-string + const size_t m = (end != NULL ? (size_t)(end - s) : n); // `m` is the minimum of `n` or the end-of-string mi_assert_internal(m <= n); char* t = (char*)mi_heap_malloc(heap, m+1); if (t == NULL) return NULL;