From 78c7a1f34911c1ce466b0730c1e64bfca5998353 Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Mon, 24 Jun 2019 01:40:28 +0800 Subject: [PATCH] Fix typo in comments --- include/mimalloc-types.h | 2 +- src/alloc-aligned.c | 2 +- src/alloc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index 6fa8281..686b02d 100644 --- a/include/mimalloc-types.h +++ b/include/mimalloc-types.h @@ -19,7 +19,7 @@ terms of the MIT license. A copy of the license can be found in the file // Define NDEBUG in the release version to disable assertions. // #define NDEBUG -// Define MI_STAT as 1 to maintain statistics; set it to 2 to have detailed statitistics (but costs some performance). +// Define MI_STAT as 1 to maintain statistics; set it to 2 to have detailed statistics (but costs some performance). // #define MI_STAT 1 // Define MI_SECURE as 1 to encode free lists diff --git a/src/alloc-aligned.c b/src/alloc-aligned.c index e650080..325158f 100644 --- a/src/alloc-aligned.c +++ b/src/alloc-aligned.c @@ -103,7 +103,7 @@ static void* mi_realloc_zero_aligned_at(void* p, size_t newsize, size_t alignmen memset((uint8_t*)newp + start, 0, newsize - start); } memcpy(newp, p, (newsize > size ? size : newsize)); - mi_free(p); // only free if succesfull + mi_free(p); // only free if successful } return newp; } diff --git a/src/alloc.c b/src/alloc.c index 910fa76..cc10ab8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -337,7 +337,7 @@ void* _mi_realloc_zero(void* p, size_t newsize, bool zero) { memset((uint8_t*)newp + start, 0, newsize - start); } memcpy(newp, p, (newsize > size ? size : newsize)); - mi_free(p); // only free if succesfull + mi_free(p); // only free if successful } return newp; }