Renaming flag in MemoryMapping
authorTom Jackson <tjackson@fb.com>
Sat, 23 Feb 2013 03:07:11 +0000 (19:07 -0800)
committerJordan DeLong <jdelong@fb.com>
Tue, 19 Mar 2013 00:07:52 +0000 (17:07 -0700)
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

folly/MemoryMapping.cpp

index 617d80062603cd5656c85f9de4d8ce39af697f66..7ac9825ee0d2b6093d76476085813339bcffa71f 100644 (file)
@@ -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) {