In my two examples, I use variable in makeslice that it will all escape to 
the heap ,  But I just want to use runtime.ReadMemStats to lookup it
and find strange 
<http://www.baidu.com/link?url=mgHi28HYr-h2pP5WsayQNFmcjUESjG2WQ5cXHq9QY9XfBgTdTYKaCGo7Oxx_nivzli2Hu4qmKHWzqqgCyTyEPvlIGCkMvlzlcTrsZxNn5Lq>ly
 
example2.go memstats.Mallocs is many times  don't know why ...

在 2016年9月29日星期四 UTC+8下午2:56:38,Dave Cheney写道:
>
> Be careful that the compiler isnt removing some or all of your program. 
> Check the asm to assert that your program is not being optimised away.
>
> Then check -gcflags=-m to see if the compiler is choosing a different 
> escape analysis depending on the size of your allocation. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to