improve layout of page for x64

This commit is contained in:
daan 2019-08-11 10:31:00 -07:00
parent 2c1da9d194
commit 7b105c4810
4 changed files with 17 additions and 17 deletions

View file

@ -182,7 +182,7 @@ typedef struct mi_page_s {
// improve page index calculation
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
void* padding[1]; // 12 words on 64-bit
// void* padding[1]; // 12 words on 64-bit
#elif MI_INTPTR_SIZE==4
// void* padding[1]; // 12 words on 32-bit
#endif

View file

@ -225,7 +225,7 @@ void mi_free(void* p) mi_attr_noexcept
}
#endif
mi_page_t* page = _mi_segment_page_of(segment, p);
mi_page_t* const page = _mi_segment_page_of(segment, p);
#if (MI_STAT>1)
mi_heap_t* heap = mi_heap_get_default();
@ -236,7 +236,7 @@ void mi_free(void* p) mi_attr_noexcept
// huge page stat is accounted for in `_mi_page_retire`
#endif
uintptr_t tid = _mi_thread_id();
const uintptr_t tid = _mi_thread_id();
if (mi_likely(tid == page->flags)) { // if equal, the thread id matches and it is not a full page, nor has aligned blocks
// local, and not full or aligned
mi_block_t* block = (mi_block_t*)p;

View file

@ -21,7 +21,7 @@ const mi_page_t _mi_page_empty = {
NULL, 0, 0,
0, NULL, NULL, NULL
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
, { NULL }
// , { NULL }
#endif
};