Fix GuardPageAllocator to do mprotect lazily
Summary:Currently GuargPageAllocator mmap's a memory block enough for 100 fiber stacks and then protects a bottom page for each stack. If FiberManager is used to process a single task, protecting 100 stacks doesn't make much sense, but is costly. This change makes sure we protect a bottom page of every stack the first time given stack is requested. Reviewed By: alikhtarov Differential Revision: D3139944 fb-gh-sync-id: d9d724eaa0e65a227eac1d09a33018e6cb098aae fbshipit-source-id: d9d724eaa0e65a227eac1d09a33018e6cb098aae
Showing
Please register or sign in to comment