Go vs GC

Hal Murray halmurray at sonic.net
Wed Jun 30 05:00:41 UTC 2021


esr at thyrsus.com said:
> The main source of memory churn is going to be allocations for incoming
> packets, and deallocations when they're no longer referenced anf get GCed.
> Allocations are fast.  GC is slow, but isn't performed very often. 

Does the low level API for receiving network packets in Go really require an 
allocation?

I don't know Go.  A quick search found an explicit allocation and then passing 
that buffer to recvfrom.  So I assume the inner loop can do one allocation and 
keep using that buffer.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list