mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
ensure proper padding for the page structure
This commit is contained in:
parent
94bff89347
commit
88b141cf1f
2 changed files with 4 additions and 4 deletions
|
@ -211,9 +211,9 @@ typedef struct mi_page_s {
|
|||
struct mi_page_s* prev; // previous page owned by this thread with the same `block_size`
|
||||
|
||||
// improve page index calculation
|
||||
// without padding: 10 words on 64-bit, 11 on 32-bit. Secure adds two words
|
||||
#if (MI_INTPTR_SIZE==4)
|
||||
void* padding[1]; // 12/14 words on 32-bit plain
|
||||
// without padding: 11 words on 64-bit, 14 on 32-bit. Secure adds two words
|
||||
#if (MI_INTPTR_SIZE==8)
|
||||
void* padding[1]; // 12/14 words on 64-bit
|
||||
#endif
|
||||
} mi_page_t;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const mi_page_t _mi_page_empty = {
|
|||
NULL,
|
||||
ATOMIC_VAR_INIT(0), ATOMIC_VAR_INIT(0),
|
||||
0, NULL, NULL, NULL
|
||||
#if (MI_INTPTR_SIZE==4)
|
||||
#if (MI_INTPTR_SIZE==8)
|
||||
, { NULL } // padding
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue