Permalink
Browse files

Renaming flag in MemoryMapping

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 Feb 23, 2013
1 parent 2b8ea38 commit d059cdd4f5791dd6c40772f817ed469cbe3a4132
Showing with 3 additions and 3 deletions.
  1. +3 −3 folly/MemoryMapping.cpp
View
@@ -22,7 +22,7 @@
#include <sys/types.h>
#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 "
"(will be rounded up to PAGESIZE)");
@@ -100,11 +100,11 @@ namespace {
off_t memOpChunkSize(off_t length) {
off_t chunkSize = length;
- if (FLAGS_mlock_max_size_at_once <= 0) {
+ if (FLAGS_mlock_chunk_size <= 0) {
return chunkSize;
}
- chunkSize = FLAGS_mlock_max_size_at_once;
+ chunkSize = FLAGS_mlock_chunk_size;
off_t pageSize = sysconf(_SC_PAGESIZE);
off_t r = chunkSize % pageSize;
if (r) {

0 comments on commit d059cdd

Please sign in to comment.