go/src/net
Jorropo 195c88b202 net/http: use pointers to array for copyBufPool
This is inspired by CL 539915, I'm only submitting now that
CL 456435 has been merged.

This divide the number of objects kept alive by the heap by two
and remove the slice header allocation in New and in the put back.

Change-Id: Ibcd5166bac5a37f365a533e09a28f3b79f81ad58
Reviewed-on: https://go-review.googlesource.com/c/go/+/543515
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-11-21 00:52:06 +00:00
..
http net/http: use pointers to array for copyBufPool 2023-11-21 00:52:06 +00:00
internal/socktest net: remove sysSocket fallback for Windows 7 2023-07-20 18:36:30 +00:00
mail net/mail: permit more characters in mail headers 2023-06-21 21:39:08 +00:00
netip net/netip: optimize AddrPort.String for IPv4 addresses 2023-11-17 16:50:42 +00:00
rpc net/rpc: use reflect.TypeFor for known types 2023-08-03 15:57:23 +00:00
smtp net/http, net/internal, net/smtp: add wasip1 2023-04-11 20:54:10 +00:00
testdata net: add support for /etc/hosts aliases using go resolver 2022-11-10 18:29:14 +00:00
textproto mime/multipart: limit parsed mime message sizes 2023-04-04 17:02:00 +00:00
url net/url: use quick path in URL.Encode() on empty map 2023-11-07 22:01:35 +00:00
addrselect.go all: fix function names in comments 2022-11-04 22:36:12 +00:00
addrselect_test.go net: precompute rfc6724policyTable in addrselect 2022-09-05 07:16:00 +00:00
cgo_aix.go
cgo_android.go
cgo_bsd.go net: adjust build tags for darwin libc calls 2022-11-07 21:05:53 +00:00
cgo_darwin.go net: adjust build tags for darwin libc calls 2022-11-07 21:05:53 +00:00
cgo_linux.go
cgo_netbsd.go
cgo_openbsd.go
cgo_resnew.go net: use libc (not cgo) for DNS on macOS 2022-11-01 14:05:39 +00:00
cgo_resold.go
cgo_socknew.go
cgo_sockold.go net: use libc (not cgo) for DNS on macOS 2022-11-01 14:05:39 +00:00
cgo_solaris.go
cgo_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
cgo_unix.go net: clear malloc'ed memory in cgoResSearch 2023-10-11 22:40:01 +00:00
cgo_unix_cgo.go net: set IsNotFound for unknown services in LookupPort 2023-09-28 13:41:21 +00:00
cgo_unix_cgo_darwin.go net: use and assert correct res state size at compile time when cgo available on darwin 2023-05-16 16:01:08 +00:00
cgo_unix_cgo_res.go net: fix res_search uses on alpine, android, dragonfly 2022-11-08 20:59:42 +00:00
cgo_unix_cgo_resn.go net: fix res_search uses on alpine, android, dragonfly 2022-11-08 20:59:42 +00:00
cgo_unix_syscall.go net: set IsNotFound for unknown services in LookupPort 2023-09-28 13:41:21 +00:00
cgo_unix_test.go net: net remove completed return from cgo lookup functions 2023-05-04 16:28:59 +00:00
conf.go src: a/an grammar fixes 2023-11-20 15:56:08 +00:00
conf_test.go net: don't treat unknown sources as dns when there is a dns source 2023-05-11 23:49:19 +00:00
conn_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
dial.go net: use bytealg.LastIndexByteString 2023-09-15 12:57:52 +00:00
dial_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
dial_unix_test.go
dnsclient.go
dnsclient_test.go
dnsclient_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
dnsclient_unix_test.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
dnsconfig.go net: support no-reload option for unix go resolver 2022-11-01 22:44:57 +00:00
dnsconfig_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
dnsconfig_unix_test.go net: do not modify shared test variable in TestDNSReadConfig 2022-11-03 17:41:32 +00:00
dnsconfig_windows.go net: filter disabled interfaces in Windows DNS client 2023-06-02 16:58:42 +00:00
dnsname_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
error_plan9.go
error_plan9_test.go net: remove unused errTimedout 2023-08-31 16:59:22 +00:00
error_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
error_posix_test.go
error_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
error_unix.go net: add wasip1 support 2023-04-11 20:54:12 +00:00
error_unix_test.go net: remove unused errTimedout 2023-08-31 16:59:22 +00:00
error_windows.go
error_windows_test.go net: remove unused errTimedout 2023-08-31 16:59:22 +00:00
example_test.go
external_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
fd_fake.go src: a/an grammar fixes 2023-11-20 15:56:08 +00:00
fd_js.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
fd_plan9.go
fd_posix.go
fd_unix.go os: explicitly check for invalid FD in NewFile 2023-05-24 20:19:46 +00:00
fd_wasip1.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
fd_windows.go net: deflake TestDialTimeout on windows 2023-09-01 15:17:54 +00:00
file.go
file_plan9.go net: unify TCP keepalive behavior 2022-11-10 18:46:00 +00:00
file_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
file_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
file_unix.go net: unify TCP keepalive behavior 2022-11-10 18:46:00 +00:00
file_unix_test.go net: skip TestFileFdBlocks if the "unix" network is not supported 2023-05-22 16:48:53 +00:00
file_wasip1.go net: test net.FileConn and net.FileListener with UDP sockets on wasip1 2023-06-12 23:11:39 +00:00
file_wasip1_test.go net: ensure net.Addr values match the connection type on wasip1 2023-06-13 21:06:56 +00:00
file_windows.go
hook.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
hook_plan9.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
hook_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
hook_windows.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
hosts.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
hosts_test.go net: respect hosts file when resolving names for Windows 2023-09-04 07:21:38 +00:00
interface.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_aix.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_bsd.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_bsd_test.go
interface_bsdvar.go
interface_darwin.go
interface_freebsd.go
interface_linux.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_linux_test.go
interface_plan9.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_solaris.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
interface_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
interface_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
interface_unix_test.go net: tolerate permission errors in interface tests 2023-07-18 23:51:35 +00:00
interface_windows.go net: add FlagRunning to exactly reflect the states of an interface. 2022-08-27 05:42:03 +00:00
ip.go net: use net/netip for address parsing 2023-01-31 22:29:57 +00:00
ip_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
iprawsock.go net: remove unused error result from newRawConn 2023-07-20 16:58:25 +00:00
iprawsock_plan9.go
iprawsock_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
iprawsock_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
ipsock.go net: use bytealg.LastIndexByteString 2023-09-15 12:57:52 +00:00
ipsock_plan9.go net: avoid internal hooks in TestDialTimeout 2023-08-29 20:38:53 +00:00
ipsock_plan9_test.go
ipsock_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
ipsock_test.go
listen_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
lookup.go net: handle the network parameter properly in LookupPort 2023-10-02 23:13:53 +00:00
lookup_plan9.go net: set IsNotFound on windows and plan9 DNS queries 2023-10-23 09:03:09 +00:00
lookup_test.go net: set IsNotFound on windows and plan9 DNS queries 2023-10-23 09:03:09 +00:00
lookup_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
lookup_windows.go net: set IsNotFound on windows and plan9 DNS queries 2023-10-23 09:03:09 +00:00
lookup_windows_test.go net: use strings.Builder 2022-09-07 00:49:41 +00:00
mac.go
mac_test.go
main_cloexec_test.go
main_conf_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
main_noconf_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
main_plan9_test.go
main_posix_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
main_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
main_unix_test.go
main_wasm_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
main_windows_test.go net: remove sysSocket fallback for Windows 7 2023-07-20 18:36:30 +00:00
mockserver_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
mptcpsock_linux.go net/http: fix spelling issues in comments and tests 2023-05-24 18:48:34 +00:00
mptcpsock_linux_test.go net: mptcp: force using MPTCP with GODEBUG 2023-07-11 00:36:57 +00:00
mptcpsock_stub.go net: mptcp: add TCPConn's MultipathTCP checker 2023-04-18 13:48:22 +00:00
net.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
net_fake.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
net_fake_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
net_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
net_windows_test.go
netcgo_off.go net: rewrite and simplify resolver configuration 2023-04-27 22:26:09 +00:00
netcgo_on.go net: rewrite and simplify resolver configuration 2023-04-27 22:26:09 +00:00
netgo_netcgo.go net: rewrite and simplify resolver configuration 2023-04-27 22:26:09 +00:00
netgo_off.go net: rewrite and simplify resolver configuration 2023-04-27 22:26:09 +00:00
netgo_on.go net: rewrite and simplify resolver configuration 2023-04-27 22:26:09 +00:00
nss.go net: rewrite nsswitch.conf parsing to work like other parsers 2022-11-15 20:15:51 +00:00
nss_test.go net: rewrite nsswitch.conf parsing to work like other parsers 2022-11-15 20:15:51 +00:00
packetconn_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
parse.go net: use bytealg.LastIndexByteString 2023-09-15 12:57:52 +00:00
parse_test.go net: add wasip1 support 2023-04-11 20:54:12 +00:00
pipe.go
pipe_test.go
platform_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
port.go
port_test.go
port_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
protoconn_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
rawconn.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
rawconn_stub_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
rawconn_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
rawconn_unix_test.go
rawconn_windows_test.go
resolverdialfunc_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
rlimit_js.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
rlimit_unix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sendfile_linux.go net,os: set the theoretical unlimited remaining bytes to max int64 2023-02-28 04:49:22 +00:00
sendfile_linux_test.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
sendfile_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sendfile_test.go net,internal/poll: mark it as handled even if sendfile(2) succeeded with 0 bytes sent 2023-10-23 18:44:26 +00:00
sendfile_unix_alt.go net,internal/poll: mark it as handled even if sendfile(2) succeeded with 0 bytes sent 2023-10-23 18:44:26 +00:00
sendfile_windows.go
server_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sock_bsd.go
sock_cloexec.go net: update SOCK_CLOEXEC comment 2023-06-09 04:04:07 +00:00
sock_linux.go internal/syscall/unix: consolidate kernelVersion implementations 2022-09-03 18:39:45 +00:00
sock_linux_test.go internal/syscall/unix: consolidate kernelVersion implementations 2022-09-03 18:39:45 +00:00
sock_plan9.go
sock_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sock_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sock_windows.go net: remove sysSocket fallback for Windows 7 2023-07-20 18:36:30 +00:00
sockaddr_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sockopt_aix.go
sockopt_bsd.go
sockopt_fake.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go net: remove unused ipv4AddrToInterface 2023-08-25 15:06:47 +00:00
sockopt_solaris.go
sockopt_windows.go
sockoptip_bsdvar.go
sockoptip_linux.go
sockoptip_posix.go
sockoptip_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
sockoptip_windows.go internal/poll, net: use (*FD).SetsockoptInet4Addr in setIPv4MulticastInterface on windows 2023-08-30 19:09:46 +00:00
splice_linux.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
splice_stub.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
splice_test.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
sys_cloexec.go
tcpsock.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
tcpsock_plan9.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
tcpsock_posix.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
tcpsock_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
tcpsock_unix_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
tcpsockopt_darwin.go
tcpsockopt_dragonfly.go
tcpsockopt_openbsd.go
tcpsockopt_plan9.go
tcpsockopt_posix.go
tcpsockopt_solaris.go
tcpsockopt_stub.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
tcpsockopt_unix.go
tcpsockopt_windows.go
timeout_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
udpsock.go net: remove unused error result from newRawConn 2023-07-20 16:58:25 +00:00
udpsock_plan9.go
udpsock_plan9_test.go
udpsock_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
udpsock_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
unixsock.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
unixsock_linux_test.go
unixsock_plan9.go
unixsock_posix.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
unixsock_readmsg_cloexec.go
unixsock_readmsg_cmsg_cloexec.go
unixsock_readmsg_other.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
unixsock_readmsg_test.go internal/poll, internal/syscall/unix, net: move and export fcntl syscall wrapper 2023-05-18 09:15:25 +00:00
unixsock_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
unixsock_windows_test.go
write_unix_test.go
writev_test.go net: enable most tests on wasip1 and js 2023-09-18 17:20:52 +00:00
writev_unix.go internal/poll, net, syscall: enable writev on aix 2022-10-07 16:48:35 +00:00