Skip to content

Commit

Permalink
Remove unnecessary ifdef.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara committed Aug 25, 2017
1 parent 7b75bd9 commit 8ed9612
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cpp/src/plasma/malloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,10 @@ void* fake_mmap(size_t size) {

int fd = create_buffer(size);
ARROW_CHECK(fd >= 0) << "Failed to create buffer during mmap";
#ifdef __linux__
// MAP_POPULATE can be used to pre-populate the page tables for this memory region
// which avoids work when accessing the pages later. However it causes long pauses
// when mmapping the files. Only supported on Linux.
void* pointer = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
#else
void* pointer = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
#endif
if (pointer == MAP_FAILED) {
ARROW_LOG(ERROR) << "mmap failed with error: " << std::strerror(errno);
if (errno == ENOMEM && plasma::plasma_config->hugepages_enabled) {
Expand Down

0 comments on commit 8ed9612

Please sign in to comment.