From 934cedf1b9844d3ab5de46afb9420eb9641ceb90 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Thu, 26 Oct 2023 22:05:21 -0400 Subject: [PATCH] Fix inconsistency in KB and MB in example code and output --- docs/28-maps-memory-leaks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/28-maps-memory-leaks.md b/docs/28-maps-memory-leaks.md index 865c236..e065467 100644 --- a/docs/28-maps-memory-leaks.md +++ b/docs/28-maps-memory-leaks.md @@ -48,7 +48,7 @@ func main() { func printAlloc() { var m runtime.MemStats runtime.ReadMemStats(&m) - fmt.Printf("%d KB\n", m.Alloc/1024) + fmt.Printf("%d MB\n", m.Alloc/(1024*1024)) } ```