Many generational garbage collectors work based on that principle - that 
recently allocated objects are most likely to be garbage, so often they are 
freed in a single pass. 

Go doesn’t do this yet, but Go pointers coupled with value structures/slices 
can give similar performance for many types of apps. 

That being said, have you observed a performance problem in your application 
related to GC? I would doubt it as the Go GC is VERY efficient. 

> On Apr 16, 2019, at 10:46 PM, jlforr...@berkeley.edu wrote:
> 
> Go's garbage collector is very nice, and solves many problems that come up in 
> C programs.
> 
> However, one thing I've been wondering about is explicitly freeing memory. I 
> know it can't be done
> now, and that the GC takes care of everything.
> 
> But I was thinking about multi-pass programs like compilers, that do a bunch 
> of work in one pass.
> Once the pass is complete then most of the memory used by the pass could be 
> freed. But that
> will never happen because the memory appears to the GC as still in use. There 
> are probably
> other examples of such program structure.
> 
> What's the current thinking on this problem?
> 
> Cordially,
> Jon Forrest
> 
> -- 
> 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.

-- 
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