Merge pull request #1 from chosungmann/fix-spelling-errors

Fix spelling errors
This commit is contained in:
Daan 2019-06-22 08:20:07 -07:00 committed by GitHub
commit 8ba50d63f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ terms of the MIT license. A copy of the license can be found in the file
// Maximum number of size classes. (spaced exponentially in 16.7% increments) // Maximum number of size classes. (spaced exponentially in 16.7% increments)
#define MI_BIN_HUGE (64U) #define MI_BIN_HUGE (64U)
// Minimal aligment necessary. On most platforms 16 bytes are needed // Minimal alignment necessary. On most platforms 16 bytes are needed
// due to SSE registers for example. This must be at least `MI_INTPTR_SIZE` // due to SSE registers for example. This must be at least `MI_INTPTR_SIZE`
#define MI_MAX_ALIGN_SIZE 16 // sizeof(max_align_t) #define MI_MAX_ALIGN_SIZE 16 // sizeof(max_align_t)
@ -150,7 +150,7 @@ typedef union mi_thread_free_u {
// `thread_free` for freed blocks by other threads // `thread_free` for freed blocks by other threads
// The `local_free` and `thread_free` lists are migrated to the `free` list // The `local_free` and `thread_free` lists are migrated to the `free` list
// when it is exhausted. The separate `local_free` list is necessary to // when it is exhausted. The separate `local_free` list is necessary to
// implement a monotonic heartbeat. The `thead_free` list is needed for // implement a monotonic heartbeat. The `thread_free` list is needed for
// avoiding atomic operations in the common case. // avoiding atomic operations in the common case.
// //
// `used - thread_freed` == actual blocks that are in use (alive) // `used - thread_freed` == actual blocks that are in use (alive)

View File

@ -201,7 +201,7 @@ static void __attribute__((constructor)) _mi_macosx_override_malloc()
zone.pressure_relief = &zone_pressure_relief; zone.pressure_relief = &zone_pressure_relief;
intro.zone_locked = &intro_zone_locked; intro.zone_locked = &intro_zone_locked;
// force the purgable zone to exist to avoid strange bugs // force the purgeable zone to exist to avoid strange bugs
if (malloc_default_purgeable_zone) { if (malloc_default_purgeable_zone) {
purgeable_zone = malloc_default_purgeable_zone(); purgeable_zone = malloc_default_purgeable_zone();
} }

View File

@ -34,7 +34,7 @@ by us is freed after we unpatched.
There are two tricky situations to deal with: There are two tricky situations to deal with:
1. The Thread Local Storage (TLS): when the main thead stops it will call registered 1. The Thread Local Storage (TLS): when the main thread stops it will call registered
callbacks on TLS entries (allocated by `FlsAlloc`). This is done by the OS callbacks on TLS entries (allocated by `FlsAlloc`). This is done by the OS
before any DLL's are unloaded. Unfortunately, the C runtime registers such before any DLL's are unloaded. Unfortunately, the C runtime registers such
TLS entries with CRT allocated memory which is freed in the callback. TLS entries with CRT allocated memory which is freed in the callback.

View File

@ -18,13 +18,13 @@ terms of the MIT license. A copy of the license can be found in the file
----------------------------------------------------------- */ ----------------------------------------------------------- */
#if (MI_MAX_ALIGN_SIZE > 4*MI_INTPTR_SIZE) #if (MI_MAX_ALIGN_SIZE > 4*MI_INTPTR_SIZE)
#error "define aligment for more than 4x word size for this platform" #error "define alignment for more than 4x word size for this platform"
#elif (MI_MAX_ALIGN_SIZE > 2*MI_INTPTR_SIZE) #elif (MI_MAX_ALIGN_SIZE > 2*MI_INTPTR_SIZE)
#define MI_ALIGN4W // 4 machine words minimal alignment #define MI_ALIGN4W // 4 machine words minimal alignment
#elif (MI_MAX_ALIGN_SIZE > MI_INTPTR_SIZE) #elif (MI_MAX_ALIGN_SIZE > MI_INTPTR_SIZE)
#define MI_ALIGN2W // 2 machine words minimal alignment #define MI_ALIGN2W // 2 machine words minimal alignment
#else #else
// ok, default aligment is 1 word // ok, default alignment is 1 word
#endif #endif