Merge branch 'master' into dev

This commit is contained in:
daan 2019-06-24 18:13:04 -07:00
commit c1226611c6
8 changed files with 19 additions and 19 deletions

View file

@ -11,11 +11,11 @@ terms of the MIT license. A copy of the license can be found in the file
#if defined(MI_MALLOC_OVERRIDE)
#if !defined(__APPLE__)
#error "this file should only be included on MacOSX"
#error "this file should only be included on macOS"
#endif
/* ------------------------------------------------------
Override system malloc on MacOSX
Override system malloc on macOS
This is done through the malloc zone interface.
------------------------------------------------------ */
@ -161,7 +161,7 @@ static malloc_zone_t* mi_get_default_zone()
}
static void __attribute__((constructor)) _mi_macosx_override_malloc()
static void __attribute__((constructor)) _mi_macos_override_malloc()
{
static malloc_introspection_t intro;
memset(&intro, 0, sizeof(intro));
@ -194,7 +194,7 @@ static void __attribute__((constructor)) _mi_macosx_override_malloc()
#if defined(MAC_OS_X_VERSION_10_6) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
// rwitch to version 9 on OSX 10.6 to support memalign.
// switch to version 9 on OSX 10.6 to support memalign.
zone.version = 9;
zone.memalign = &zone_memalign;
zone.free_definite_size = &zone_free_definite_size;

View file

@ -312,10 +312,10 @@ static double mi_clock_now() {
}
#else
#include <time.h>
#ifdef TIME_UTC
#ifdef CLOCK_REALTIME
static double mi_clock_now() {
struct timespec t;
timespec_get(&t, TIME_UTC);
clock_gettime(CLOCK_REALTIME, &t);
return (double)t.tv_sec + (1.0e-9 * (double)t.tv_nsec);
}
#else