I don't understand what you are trying to say.
Note that your code uses unsafe.Pointer in an unsupported way. See
https://golang.org/pkg/unsafe/#Pointer .
Ian
On Thu, Mar 30, 2017 at 7:08 AM, 刘桂祥 wrote:
> package main
>
> import (
> "fmt"
> "runtime"
> "unsafe"
> )
>
> func main() {
> var m ru
package main
import (
"fmt"
"runtime"
"unsafe"
)
func main() {
var m runtime.MemStats
runtime.ReadMemStats(&m)
println(m.HeapObjects, m.Mallocs)
runtime.GC()
runtime.ReadMemStats(&m)
println(m.HeapObjects, m.Mallocs)
runtime.GC()
runtime.ReadMemStats(&m)
println(m.HeapObjects, m.Mallocs)
p