Subject: [Boost-bugs] [Boost C++ Libraries] #10157: Unnecessary open/close in protected_stack_allocator.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-27 02:15:33
#10157: Unnecessary open/close in protected_stack_allocator.hpp
---------------------------+--------------------------
Reporter: windoze.net@⦠| Owner: olli
Type: Bugs | Status: new
Milestone: Boost 1.56.0 | Component: coroutine
Version: Boost 1.55.0 | Severity: Optimization
Keywords: |
---------------------------+--------------------------
boost/libs/coroutine/include/boost/coroutine/posix/protected_stack_allocator.hpp:55
Not sure why you have to open /dev/zero to get a FD for mmap, AFAIK
following line should just work on both OSX and Linux, no need to open any
file:
{{{
void * limit = ::mmap( 0, size_, PROT_READ | PROT_WRITE, MAP_PRIVATE |
MAP_ANONYMOUS, -1, 0);
}}}
I've tested on both OSX 10.9.4/10.10DP1 and Ubuntu Linux 14.04 without
problem.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10157> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC