[go-nuts] Re: memory allocations in net-related modules

2016-08-02 Thread postmaster
sync.Pool can suppress many of this allocations. -- 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, vis

[go-nuts] Re: memory allocations in net-related modules

2016-08-02 Thread Dave Cheney
You cannot, the address of sa escapes to the heap because it is returned to the caller. The solution may be to refactor the method to take a *syscall.SockaddrInet4 that was allocated in the caller, but that is not something that can be done as a consumer of the net package. On Tuesday, 2 August