[PATCH] D71975: [Support] Support MF_HUGE_HINT on Linux and FreeBSD

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 13:20:41 PST 2020


aganea added a comment.

In D71975#1803542 <https://reviews.llvm.org/D71975#1803542>, @riccibruno wrote:

> So I need to:
>
> - Add a `getHugePageSize` similar to `sys::Process::getPageSize` which will do its best to find out about the huge page size(s) on the platform. This needs to be done for Windows too.


Do you need to know the large page size outside of `Memory.inc`? If no, you could mark it as a static function, in the same way as the Windows `enableProcessLargePages()` (which detects the minimum large page size). Additionally, you can also take a look at how rpmalloc does it: `rpmalloc.c, L1802-L1871` in D71786 <https://reviews.llvm.org/D71786>, as it already handles the same platforms as LLVM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71975/new/

https://reviews.llvm.org/D71975





More information about the llvm-commits mailing list