merge in dev branch

This commit is contained in:
daan 2019-07-02 17:28:15 -07:00
commit cec3c4f9ff
3 changed files with 3 additions and 5 deletions

View File

@ -52,8 +52,7 @@ terms of the MIT license. A copy of the license can be found in the file
MI_INTERPOSE_MI(realloc),
MI_INTERPOSE_MI(free),
MI_INTERPOSE_MI(strdup),
MI_INTERPOSE_MI(strndup),
MI_INTERPOSE_MI(realpath)
MI_INTERPOSE_MI(strndup)
};
#else
// On all other systems forward to our API
@ -62,8 +61,7 @@ terms of the MIT license. A copy of the license can be found in the file
void* realloc(void* p, size_t newsize) mi_attr_noexcept MI_FORWARD2(mi_realloc, p, newsize);
void free(void* p) mi_attr_noexcept MI_FORWARD0(mi_free, p);
char* strdup(const char* s) MI_FORWARD1(mi_strdup, s);
char* strndup(const char* s, size_t n) MI_FORWARD2(mi_strndup, s, n);
char* realpath(const char* fname, char* resolved_name) MI_FORWARD2(mi_realpath, fname, resolved_name);
char* strndup(const char* s, size_t n) MI_FORWARD2(mi_strndup, s, n);
#endif
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__MACH__)

View File

@ -415,6 +415,7 @@ bool _mi_os_decommit(void* addr, size_t size, mi_stats_t* stats) {
return mi_os_commitx(addr, size, false, stats);
}
/* -----------------------------------------------------------
OS allocation using mmap/munmap
----------------------------------------------------------- */

View File

@ -201,7 +201,6 @@ static void mi_segment_os_free(mi_segment_t* segment, size_t segment_size, mi_se
#define MI_SEGMENT_CACHE_MAX (4)
#define MI_SEGMENT_CACHE_FRACTION (8)
static mi_segment_t* mi_segment_cache_pop(size_t segment_size, mi_segments_tld_t* tld) {
if (segment_size != 0 && segment_size != MI_SEGMENT_SIZE) return NULL;
mi_segment_t* segment = tld->cache;