gvisor/pkg/refs
Adin Scannell 753da9604e Remove map from fd_map, change to fd_table.
This renames FDMap to FDTable and drops the kernel.FD type, which had an entire
package to itself and didn't serve much use (it was freely cast between types,
and served as more of an annoyance than providing any protection.)

Based on BenchmarkFDLookupAndDecRef-12, we can expect 5-10 ns per lookup
operation, and 10-15 ns per concurrent lookup operation of savings.

This also fixes two tangential usage issues with the FDMap. Namely, non-atomic
use of NewFDFrom and associated calls to Remove (that are both racy and fail to
drop the reference on the underlying file.)

PiperOrigin-RevId: 256285890
2019-07-02 19:28:59 -07:00
..
BUILD Add finalizer on AtomicRefCount to check for leaks. 2019-06-28 20:07:52 -07:00
refcounter.go Remove map from fd_map, change to fd_table. 2019-07-02 19:28:59 -07:00
refcounter_state.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
refcounter_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00