From 678f6ef72f73ac053127adb491c116a71e019a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 20 Sep 2023 22:01:58 +0800 Subject: [PATCH] Fix debug.SetMemoryLimit usage --- debug_go119.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug_go119.go b/debug_go119.go index a7814613..cf522afb 100644 --- a/debug_go119.go +++ b/debug_go119.go @@ -27,7 +27,7 @@ func applyDebugOptions(options option.DebugOptions) { debug.SetTraceback(options.TraceBack) } if options.MemoryLimit != 0 { - debug.SetMemoryLimit(int64(options.MemoryLimit)) + debug.SetMemoryLimit(int64(float64(options.MemoryLimit) / 1.5)) conntrack.MemoryLimit = uint64(options.MemoryLimit) } if options.OOMKiller != nil {