Expose new --mmap switch (mmap_memory: true in NodeJS), and run test suite in this mode, as well as shared memory mode.

This commit is contained in:
Daniel Patterson
2018-10-26 23:50:46 -07:00
parent 2f9cb44368
commit b7e7d32361
9 changed files with 91 additions and 12 deletions
+3 -1
View File
@@ -23,7 +23,9 @@ bool EngineConfig::IsValid() const
unlimited_or_more_than(max_results_nearest, 0) &&
max_alternatives >= 0;
return ((use_shared_memory && all_path_are_empty) || storage_config.IsValid()) && limits_valid;
return ((use_shared_memory && all_path_are_empty) || (use_mmap && storage_config.IsValid()) ||
storage_config.IsValid()) &&
limits_valid;
}
}
}
+4 -1
View File
@@ -119,7 +119,10 @@ inline unsigned generateServerProgramOptions(const int argc,
"Load data from shared memory") //
("memory_file",
value<boost::filesystem::path>(&config.memory_file),
"Store data in a memory mapped file rather than in process memory.") //
"DEPRECATED: Will behave the same as --mmap.")(
"mmap,m",
value<bool>(&config.use_mmap)->implicit_value(true)->default_value(false),
"Map datafiles directly, do not use any additional memory.") //
("dataset-name",
value<std::string>(&config.dataset_name),
"Name of the shared memory dataset to connect to.") //