On Sunday, November 15, 2020 at 10:24:05 PM UTC-5 [email protected] 
wrote:

> It is the same. If it can escape the allocation frame you need GC. 
>

It could be viewed as advanced escape analyzing (by supporting run-time 
escape analyzing).
For example, a value might be used by many goroutines at run time,
but at any time point, it is only be used by one goroutine.
 

>
> On Nov 15, 2020, at 7:34 PM, [email protected] <[email protected]> wrote:
>
> 
>
> Aha, I forgot this fact. You are totally right.
>
> It is a bad example. A better example: is it possible to detect that some 
> values are always single-owner (and their out-of-reach time point are also 
> detectable)?
>
> On Sunday, November 15, 2020 at 8:23:58 PM UTC-5 [email protected] wrote:
>
>> I may be misunderstanding what you're suggesting, but I believe Go 
>> already tries to detect when a value can be placed on the stack. Then, it 
>> will be freed automatically when it falls out of scope.
>>
>> On Sun, Nov 15, 2020 at 5:20 PM [email protected] <[email protected]> 
>> wrote:
>>
>>>
>>> For example, some local memory allocations could be detected no used 
>>> elsewhere so that they can may be freed immediately when out of reach 
>>> instead of waiting to be freed in the GC phase. 
>>>
>>> -- 
>>> 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 [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/5c38b239-fe56-44ce-aaf6-61636a682707n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/golang-nuts/5c38b239-fe56-44ce-aaf6-61636a682707n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
> 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 [email protected].
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/7c7fcfde-14a3-4c6d-b53c-3c44f31d1568n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/7c7fcfde-14a3-4c6d-b53c-3c44f31d1568n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4b798d4e-269d-487c-a85a-835078c6625an%40googlegroups.com.

Reply via email to