forked from OSchip/llvm-project
tsan: advise shadow for 0x7f region to not use huge pages
see the comment for justification llvm-svn: 214030
This commit is contained in:
parent
5b1b02eb29
commit
7b70cadae9
|
@ -228,6 +228,12 @@ void InitializeShadowMemory() {
|
|||
"to link with -pie (%p, %p).\n", shadow, kLinuxShadowBeg);
|
||||
Die();
|
||||
}
|
||||
// This memory range is used for thread stacks and large user mmaps.
|
||||
// Frequently a thread uses only a small part of stack and similarly
|
||||
// a program uses a small part of large mmap. On some programs
|
||||
// we see 20% memory usage reduction without huge pages for this range.
|
||||
madvise((void*)MemToShadow(0x7f0000000000ULL),
|
||||
0x10000000000ULL * kShadowMultiplier, MADV_NOHUGEPAGE);
|
||||
DPrintf("memory shadow: %zx-%zx (%zuGB)\n",
|
||||
kLinuxShadowBeg, kLinuxShadowEnd,
|
||||
(kLinuxShadowEnd - kLinuxShadowBeg) >> 30);
|
||||
|
|
Loading…
Reference in New Issue