Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoongArch64 use 32 HUGE_PAGE_SIZE #1230

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tbbmalloc/tbbmalloc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ void suppress_unused_warning( const T& ) {}
/*
* Default huge page size
*/
#if defined __loongarch64
static const size_t HUGE_PAGE_SIZE = 32 * 1024 * 1024;
#else
static const size_t HUGE_PAGE_SIZE = 2 * 1024 * 1024;
#endif

/********** End of global default constants *********/

Expand Down
4 changes: 4 additions & 0 deletions test/tbbmalloc/test_malloc_whitebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,11 @@ void TestTHP() {
scalable_allocation_mode(USE_HUGE_PAGES, 1);
REQUIRE_MESSAGE(hugePages.isEnabled, "Huge pages should be enabled via scalable_allocation_mode");

#if defined __loongarch64
const int HUGE_PAGE_SIZE = 32 * 1024 * 1024;
#else
const int HUGE_PAGE_SIZE = 2 * 1024 * 1024;
#endif

// allocCount transparent huge pages should be allocated
const int allocCount = 10;
Expand Down
Loading