[PATCH] D39300: [SectionMemoryManager] Abstract out mmap, munmap, mprotect even more ; NFC

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 28 11:28:58 PDT 2017


sanjoy added a comment.

In https://reviews.llvm.org/D39300#910042, @lhames wrote:

> Out of interest, what’s the use case for this? I’d have expected sys::Memory to be good enough for block-based allocation (though there’s the known issue with PaX on BSD that I need to fix), and using a non block-based underlying allocator seems like it’d risk unnecessary fragmentation.


This is just so that the mmap can come from a file or a memfd, which will make the mapping show up with a name and not as "anon" under perf etc.


https://reviews.llvm.org/D39300





More information about the llvm-commits mailing list