m/b/circular: use correct fd for MAP_ANONYMOUS
This commit is contained in:
parent
1bfe4867ad
commit
8dc4abb69c
@ -90,7 +90,7 @@ circular::circular (size_t bytes)
|
|||||||
// pre-allocate a sufficiently large virtual memory block. it doesn't
|
// pre-allocate a sufficiently large virtual memory block. it doesn't
|
||||||
// matter much what flags we use because we'll just be overwriting it
|
// matter much what flags we use because we'll just be overwriting it
|
||||||
// shortly.
|
// shortly.
|
||||||
m_begin = reinterpret_cast<char*> (mmap (nullptr, bytes * 2, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0));
|
m_begin = reinterpret_cast<char*> (mmap (nullptr, bytes * 2, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
|
||||||
if (MAP_FAILED == m_begin)
|
if (MAP_FAILED == m_begin)
|
||||||
errno_error::throw_code ();
|
errno_error::throw_code ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user