Skip to content

Commit de7eac6

Browse files
committed
poof
1 parent 96e4cd6 commit de7eac6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/obmalloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ _PyMem_ArenaAlloc(void *Py_UNUSED(ctx), size_t size)
578578
if (ptr == MAP_FAILED)
579579
return NULL;
580580
assert(ptr != NULL);
581+
#ifdef MADV_HUGEPAGE
582+
(void)madvise(ptr, size, MADV_HUGEPAGE);
583+
#endif
581584
(void)_PyAnnotateMemoryMap(ptr, size, "cpython:pymalloc");
582585
return ptr;
583586
#else

0 commit comments

Comments
 (0)