mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
further layout improvement for msvc code generation
This commit is contained in:
parent
7b105c4810
commit
2e924150ae
2 changed files with 5 additions and 5 deletions
|
@ -167,9 +167,9 @@ typedef struct mi_page_s {
|
||||||
#if MI_SECURE
|
#if MI_SECURE
|
||||||
uintptr_t cookie; // random cookie to encode the free lists
|
uintptr_t cookie; // random cookie to encode the free lists
|
||||||
#endif
|
#endif
|
||||||
size_t used; // number of blocks in use (including blocks in `local_free` and `thread_free`)
|
|
||||||
mi_page_flags_t flags; // threadid:62 | has_aligned:1 | in_full:1
|
mi_page_flags_t flags; // threadid:62 | has_aligned:1 | in_full:1
|
||||||
|
size_t used; // number of blocks in use (including blocks in `local_free` and `thread_free`)
|
||||||
|
|
||||||
mi_block_t* local_free; // list of deferred free blocks by this thread (migrates to `free`)
|
mi_block_t* local_free; // list of deferred free blocks by this thread (migrates to `free`)
|
||||||
volatile uintptr_t thread_freed; // at least this number of blocks are in `thread_free`
|
volatile uintptr_t thread_freed; // at least this number of blocks are in `thread_free`
|
||||||
volatile mi_thread_free_t thread_free; // list of deferred free blocks freed by other threads
|
volatile mi_thread_free_t thread_free; // list of deferred free blocks freed by other threads
|
||||||
|
@ -182,7 +182,7 @@ typedef struct mi_page_s {
|
||||||
|
|
||||||
// improve page index calculation
|
// improve page index calculation
|
||||||
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
|
#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
|
#elif MI_INTPTR_SIZE==4
|
||||||
// void* padding[1]; // 12 words on 32-bit
|
// void* padding[1]; // 12 words on 32-bit
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,11 +17,11 @@ const mi_page_t _mi_page_empty = {
|
||||||
#if MI_SECURE
|
#if MI_SECURE
|
||||||
0,
|
0,
|
||||||
#endif
|
#endif
|
||||||
0, 0, // used, flags
|
0, 0, // flags, used
|
||||||
NULL, 0, 0,
|
NULL, 0, 0,
|
||||||
0, NULL, NULL, NULL
|
0, NULL, NULL, NULL
|
||||||
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
|
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
|
||||||
// , { NULL }
|
, { NULL }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue