@kortschak
I think there are many benefits by using a pure Go implementation than a 
CGO one.
It would be even better to reuse/expose the internal tcmalloc.

@Ian
How about forbidding manual allocated memory references normal pointers?

On Sunday, November 15, 2020 at 9:23:54 PM UTC-5 Ian Lance Taylor wrote:

> On Sun, Nov 15, 2020 at 5:38 PM tapi...@gmail.com <tapi...@gmail.com> 
> wrote:
> >
> > For example, by adding two new built-in functions: alloc and free, 
> garbage collector will ignore the memory allocated by alloc. The memory 
> allocated by alloc must be freed by calling the free function manually.
> >
> > This would relieve the burden of GC for some Go programs (such as games).
>
> I think this is a misunderstanding of where GC time goes. If you can
> store a normal Go pointer in memory allocated using the new alloc
> function, then memory allocated by alloc must still be scanned by the
> GC.
>
> Ian
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/21159b26-4a56-455d-9665-b4f1eeaf8f33n%40googlegroups.com.

Reply via email to