HomeFreeBSD

fd: free old file descriptor tables when not shared

Description

fd: free old file descriptor tables when not shared

During the life of a process, new file descriptor tables may be allocated. When
a new table is allocated, the old table is placed in a free list and held onto
until all processes referencing them exit.

When a new file descriptor table is allocated, the old file descriptor table
can be freed when the current process has a single-thread and the file
descriptor table is not being shared with any other processes.

Reviewed by: kevans
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D18617

Details

Provenance
rewAuthored on
Reviewer
kevans
Differential Revision
D18617: free old file descriptor tables when not shared
Parents
rS367926: Make handlers and atpds overflows unlikely.
Branches
Unknown
Tags
Unknown