Merge pull request #910 from alexmiller-apple/disable-hugepages

Don't allocate magazines backed by hugepages on systems that support them.
This commit is contained in:
Steve Atherton 2018-11-12 14:20:31 -08:00 committed by GitHub
commit b927d20da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -374,7 +374,10 @@ void FastAllocator<Size>::getMagazine() {
ASSERT( block == desiredBlock );
#endif
#else
block = (void **)::allocate(magazine_size * Size, true);
// FIXME: We should be able to allocate larger magazine sizes here if we
// detect that the underlying system supports hugepages. Using hugepages
// with smaller-than-2MiB magazine sizes strands memory. See issue #909.
block = (void **)::allocate(magazine_size * Size, false);
#endif
//void** block = new void*[ magazine_size * PSize ];