merge from dev

This commit is contained in:
daan 2019-11-24 18:51:09 -08:00
commit 128cdd1dfb
4 changed files with 26 additions and 16 deletions

View file

@ -313,7 +313,7 @@ static mi_segment_t* mi_segment_cache_pop(size_t segment_slices, mi_segments_tld
static bool mi_segment_cache_full(mi_segments_tld_t* tld)
{
if (tld->count == 1 && tld->cache_count==0) return false; // always cache at least the final segment of a thread
// if (tld->count == 1 && tld->cache_count==0) return false; // always cache at least the final segment of a thread
size_t max_cache = mi_option_get(mi_option_segment_cache);
if (tld->cache_count < max_cache
&& tld->cache_count < (1 + (tld->peak_count / MI_SEGMENT_CACHE_FRACTION)) // at least allow a 1 element cache
@ -1028,6 +1028,7 @@ mi_page_t* _mi_segment_page_alloc(size_t block_size, mi_segments_tld_t* tld, mi_
set to 1 if it contains the segment meta data.
----------------------------------------------------------- */
#if (MI_INTPTR_SIZE==8)
#define MI_MAX_ADDRESS ((size_t)20 << 40) // 20TB
#else