add bootstrap.mlockall setting to control if mlockall should be called or not

This commit is contained in:
kimchy 2010-11-14 15:54:40 +02:00
parent 30929c3d01
commit d0ac9087b6
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ public class Bootstrap {
private void setup(boolean addShutdownHook, Tuple<Settings, Environment> tuple) throws Exception {
// Loggers.getLogger(Bootstrap.class, tuple.v1().get("name")).info("heap_size {}/{}", JvmStats.jvmStats().mem().heapCommitted(), JvmInfo.jvmInfo().mem().heapMax());
Natives.tryMlockall();
if (tuple.v1().getAsBoolean("bootstrap.mlockall", true)) {
Natives.tryMlockall();
}
tuple = setupJmx(tuple);
NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder().settings(tuple.v1()).loadConfigSettings(false);