mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
fix huge page aligned allocation size in secure mode
This commit is contained in:
parent
1632dd73c9
commit
96f1574faf
3 changed files with 18 additions and 10 deletions
|
@ -149,7 +149,7 @@ int main(void) {
|
|||
for (size_t align = 1; align <= MI_ALIGNMENT_MAX && ok; align *= 2) {
|
||||
void* ps[8];
|
||||
for (int i = 0; i < 8 && ok; i++) {
|
||||
ps[i] = mi_malloc_aligned(align*13 /*size*/, align);
|
||||
ps[i] = mi_malloc_aligned(align*5 /*size*/, align);
|
||||
if (ps[i] == NULL || (uintptr_t)(ps[i]) % align != 0) {
|
||||
ok = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue