HomeFreeBSD

lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c to RB Trees

Description

lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c to RB Trees

This saves oodles of memory, especially when "ulimit -n" is large. It
also prevents a buffer overflow if getrlimit should fail.

Also replace per-fd condvars with mutexes to simplify the code.

PR: 274968
MFC after: 2 weeks
Sponsored by: Axcient
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D42597

Details

Provenance
asomersAuthored on Nov 10 2023, 5:28 PM
Reviewer
kib
Differential Revision
D42597: libc/libc/rpc: refactor some global variables
Parents
rGa5c2f4e93943: libc/libc/rpc: refactor some global variables
Branches
Unknown
Tags
Unknown