Ok. Let's test:
package main
import (
"time"
"log"
)
type Big struct {
Data string
}
func biggy () {
a := &Big{}
a.Data = "Very very long string"
}
func main() {
log.Print("Prepare")
time.Sleep(10000000000)
log.Print("Trashing")
for i := 0; i<100000000; i++ {
biggy()
}
log.Print("All done")
for {
time.Sleep(1000000)
}
}
Results:
- Prepare phase: VIRT 7220, RES 940, SHR 504
- Trashing phase: VIRT 10108, RES 2216, SHR 924
- After all: VIRT 10108, RES 2216, SHR 924
Wow! It has not yet been added to the FAQ? Major developers, that with
you? Thank you all, I'm gone.