1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Support/Windows
Alexandre Ganea a891789c78 [Memory] Add basic support for large/huge memory pages
This patch introduces Memory::MF_HUGE_HINT which indicates that allocateMappedMemory() shall return a pointer to a large memory page.
However the flag is a hint because we're not guaranteed in any way that we will get back a large memory page. There are several restrictions:

- Large/huge memory pages aren't enabled by default on modern OSes (Windows 10 and Linux at least), and should be manually enabled/reserved.
- Once enabled, it should be kept in mind that large pages are physical only, they can't be swapped.
- Memory fragmentation can affect the availability of large pages, especially after running the OS for a long time and/or running along many other applications.

Memory::allocateMappedMemory() will fallback to 4KB pages if it can't allocate 2MB large pages (if Memory::MF_HUGE_HINT is provided)

Currently, Memory::MF_HUGE_HINT only works on Windows. The hint will be ignored on Linux, 4KB pages will always be returned.

Differential Revision: https://reviews.llvm.org/D58718

llvm-svn: 355065
2019-02-28 02:47:34 +00:00
..
COM.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DynamicLibrary.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
explicit_symbols.inc
Host.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Memory.inc [Memory] Add basic support for large/huge memory pages 2019-02-28 02:47:34 +00:00
Mutex.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Path.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Process.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Program.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RWMutex.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Signals.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Threading.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadLocal.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Watchdog.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsSupport.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00