Skip to content

Instantly share code, notes, and snippets.

@awly
Last active December 16, 2015 08:09
Show Gist options
  • Save awly/5403749 to your computer and use it in GitHub Desktop.
Save awly/5403749 to your computer and use it in GitHub Desktop.
No more memory problems!
func assistGC(t uint64) {
for {
runtime.GC()
time.Sleep(t)
go assistGC(t + 1)
}
}
func main() {
runtime.GOMAXPROC(runtime.NumCpu())
go assistGC(10)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment