Skip to content

Commit

Permalink
Fix debug.SetMemoryLimit usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Sep 20, 2023
1 parent ae8187e commit 678f6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debug_go119.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 678f6ef

Please sign in to comment.