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

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 20:10:21 PST 2017


lhames added a comment.

In https://reviews.llvm.org/D39300#910081, @sanjoy wrote:

> 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.


Ahh. Makes sense.

Apologies for the delayed reply: I've been on the road. Thanks asbirlea and jlebar for stepping in.


https://reviews.llvm.org/D39300





More information about the llvm-commits mailing list