Fix inconsistency in KB and MB in example code and output

This commit is contained in:
Austin Raney 2023-10-26 22:05:21 -04:00 committed by GitHub
parent 668d6165fe
commit 934cedf1b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))
}
```