Skip to content

Commit

Permalink
Renaming flag in MemoryMapping
Browse files Browse the repository at this point in the history
Summary:
This flag conflicts with the flag with the same purpose in
`common/files/MemoryMappedFile.cpp`. Just renaming it for now.

Test Plan: Build

Reviewed By: lucian@fb.com

FB internal diff: D717067
  • Loading branch information
ddrcoder authored and jdelong committed Mar 19, 2013
1 parent 2b8ea38 commit d059cdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions folly/MemoryMapping.cpp
Expand Up @@ -22,7 +22,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <system_error> #include <system_error>


DEFINE_int64(mlock_max_size_at_once, 1 << 20, // 1MB DEFINE_int64(mlock_chunk_size, 1 << 20, // 1MB
"Maximum bytes to mlock/munlock/munmap at once " "Maximum bytes to mlock/munlock/munmap at once "
"(will be rounded up to PAGESIZE)"); "(will be rounded up to PAGESIZE)");


Expand Down Expand Up @@ -100,11 +100,11 @@ namespace {


off_t memOpChunkSize(off_t length) { off_t memOpChunkSize(off_t length) {
off_t chunkSize = length; off_t chunkSize = length;
if (FLAGS_mlock_max_size_at_once <= 0) { if (FLAGS_mlock_chunk_size <= 0) {
return chunkSize; return chunkSize;
} }


chunkSize = FLAGS_mlock_max_size_at_once; chunkSize = FLAGS_mlock_chunk_size;
off_t pageSize = sysconf(_SC_PAGESIZE); off_t pageSize = sysconf(_SC_PAGESIZE);
off_t r = chunkSize % pageSize; off_t r = chunkSize % pageSize;
if (r) { if (r) {
Expand Down

0 comments on commit d059cdd

Please sign in to comment.