mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-21 00:47:11 +08:00
Merge pull request #68 from aaraney/patch-1
Fix inconsistency in KB and MB in example code and output
This commit is contained in:
commit
7a8e78cd26
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue