Re: [go-nuts] Some questions about GC and map[int]int

2023-11-26 Thread 'Zhao Weng' via golang-nuts
@Brian thanks a lot for confirmation!!! On Saturday, November 25, 2023 at 12:09:25 AM UTC+8 Brian Candler wrote: > Yes, it says it will not scan the *entries of the map* (i.e. the keys and > the values held *within* the map). > > But if the map points to (say) 100,000 separate hash buckets,

Re: [go-nuts] Some questions about GC and map[int]int

2023-11-23 Thread Kurtis Rader
You only need to ask for help once. You sent essentially the same message twice. Also, your example program doesn't provide any time for the GC to run in any meaningful manner as far as I can tell. So I am confused how your trivial program relates to a real world program. That is, while simple

[go-nuts] Some questions about GC and map[int]int, please help

2023-11-23 Thread 'Zhao Weng' via golang-nuts
Dear Gophers: I have some questions about GC and map[int]int, please help. consider the following program: ```go package main import ( "fmt" "os" "runtime/pprof" ) func main() { f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666 ) if err != nil { panic(err) } m :=

[go-nuts] Some questions about GC and map[int]int

2023-11-23 Thread 'Zhao Weng' via golang-nuts
Dear Gophers: I have some questions about GC and map[int]int, please help. consider the following program: ```go package main import ( "fmt" "os" "runtime/pprof" ) func main() { f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666 ) if err != nil { panic(err) } m :=

[go-nuts] Some questions about GC and map[int]int

2023-11-23 Thread 'Zhao Weng' via golang-nuts
Dear Gophers: I have some questions about GC and map[int]int, please help. consider the following program: ```go package main import ( "fmt" "os" "runtime/pprof" ) func main() { f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666 ) if err != nil { panic(err) } m :=