// 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)
}
percent:=*allowedMemPercent/100
mem:=sysTotalMemory()
allowedMemory=int(float64(mem)*percent)
remainingMemory=mem-allowedMemory
logger.Infof("limiting caches to %d bytes, leaving %d bytes to the OS according to -memory.allowedPercent=%g",allowedMemory,remainingMemory,*allowedMemPercent)