From 89a922fb19f3d1e0f6f43f21e6072bca2494a4b5 Mon Sep 17 00:00:00 2001 From: Vyacheslav Mitrofanov Date: Wed, 3 Jun 2020 23:39:29 +0300 Subject: [PATCH] allow to use values lower than 10 with the flag -memory.allowedPercent (#531) Co-authored-by: Vyacheslav Mitrofanov --- lib/memory/memory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/memory/memory.go b/lib/memory/memory.go index 7049138f8..f9982098c 100644 --- a/lib/memory/memory.go +++ b/lib/memory/memory.go @@ -24,8 +24,8 @@ func initOnce() { // Do not use logger.Panicf here, since logger may be uninitialized yet. panic(fmt.Errorf("BUG: memory.Allowed must be called only after flag.Parse call")) } - if *allowedMemPercent < 10 || *allowedMemPercent > 200 { - logger.Panicf("FATAL: -memory.allowedPercent must be in the range [10...200]; got %f", *allowedMemPercent) + if *allowedMemPercent < 1 || *allowedMemPercent > 200 { + logger.Panicf("FATAL: -memory.allowedPercent must be in the range [1...200]; got %f", *allowedMemPercent) } percent := *allowedMemPercent / 100