Merge pull request #68 from aaraney/patch-1

Fix inconsistency in KB and MB in example code and output
This commit is contained in:
Teiva Harsanyi 2023-11-28 19:37:39 +01:00 committed by GitHub
commit 7a8e78cd26
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))
}
```