|
pstore2
|
POSIX implementation of the platform-independent memory-mapped file. More...
#include "pstore/os/memory_mapper.hpp"#include <cassert>#include <cerrno>#include <limits>#include <sstream>#include <sys/mman.h>#include <unistd.h>#include "pstore/config/config.hpp"#include "pstore/support/error.hpp"#include "pstore/support/quoted.hpp"
Macros | |
| #define | MAP_ANONYMOUS MAP_ANON |
Functions | |
| std::shared_ptr< std::uint8_t > | pstore::aligned_valloc (std::size_t size, unsigned align) |
| Allocates memory whose start address is a multiple of 'align'. More... | |
POSIX implementation of the platform-independent memory-mapped file.
| std::shared_ptr< std::uint8_t > pstore::aligned_valloc | ( | std::size_t | size, |
| unsigned | align | ||
| ) |
Allocates memory whose start address is a multiple of 'align'.
This function uses the O/S memory allocation API directly and bypasses operator new/malloc(). This is to ensure that the library can safely change the memory permission (with mprotect() or equivalent).
1.8.13