diff --git a/cmd/sing-box/debug.go b/cmd/sing-box/debug.go index 4f12ac92..bffa721f 100644 --- a/cmd/sing-box/debug.go +++ b/cmd/sing-box/debug.go @@ -25,9 +25,9 @@ func init() { runtime.ReadMemStats(&memStats) var memObject badjson.JSONObject - memObject.Put("heap", humanize.Bytes(memStats.HeapInuse)) - memObject.Put("stack", humanize.Bytes(memStats.StackInuse)) - memObject.Put("idle", humanize.Bytes(memStats.HeapIdle-memStats.HeapReleased)) + memObject.Put("heap", humanize.IBytes(memStats.HeapInuse)) + memObject.Put("stack", humanize.IBytes(memStats.StackInuse)) + memObject.Put("idle", humanize.IBytes(memStats.HeapIdle-memStats.HeapReleased)) memObject.Put("goroutines", runtime.NumGoroutine()) memObject.Put("rss", rusageMaxRSS()) diff --git a/experimental/libbox/setup.go b/experimental/libbox/setup.go index 222f9363..08855fd0 100644 --- a/experimental/libbox/setup.go +++ b/experimental/libbox/setup.go @@ -17,5 +17,5 @@ func Version() string { } func FormatBytes(length int64) string { - return humanize.Bytes(uint64(length)) + return humanize.IBytes(uint64(length)) }