gvisor/pkg
Jamie Liu 9ea248489b Cap initial usermem.CopyStringIn buffer size.
Almost (?) all uses of CopyStringIn are via linux.copyInPath(), which
passes maxlen = linux.PATH_MAX = 4096. Pre-allocating a buffer of this
size is measurably inefficient in most cases: most paths will not be
this long, 4 KB is a lot of bytes to zero, and as of this writing the Go
runtime allocator maps only two 4 KB objects to each 8 KB span,
necessitating a call to runtime.mcache.refill() on ~every other call.
Limit the initial buffer size to 256 B instead, and geometrically
reallocate if necessary.

PiperOrigin-RevId: 251960441
2019-06-06 17:22:00 -07:00
..
abi Use common definition of SockType. 2019-06-06 17:00:27 -07:00
amutex gvisor: interrupt the sendfile system call if a task has been interrupted 2019-05-23 23:21:13 -07:00
atomicbitops Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
binary Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
bits Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
bpf Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
compressio Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
control Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
cpuid Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
eventchannel Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
fd Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
fdnotifier Automated rollback of changelist 247964961 2019-05-15 14:58:40 -07:00
gate Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
ilist Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
linewriter Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
log Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
metric Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
p9 Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
rand Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
refs Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
seccomp Add arm64 support to pkg/seccomp 2019-05-03 22:03:59 -07:00
secio Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
segment Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
sentry Cap initial usermem.CopyStringIn buffer size. 2019-06-06 17:22:00 -07:00
sleep Add build guard to files using go:linkname 2019-05-30 12:09:39 -07:00
state Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
syserr Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
syserror Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
tcpip Track and export socket state. 2019-06-06 15:04:47 -07:00
tmutex Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
unet Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
urpc Add multi-fd support to fdbased endpoint. 2019-06-06 08:07:02 -07:00
waiter Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00