]> git.ipfire.org Git - thirdparty/glibc.git/commit
nss: Introduce <nss_module.h>
authorFlorian Weimer <fweimer@redhat.com>
Wed, 19 Feb 2020 19:55:48 +0000 (20:55 +0100)
committerDJ Delorie <dj@redhat.com>
Fri, 4 Dec 2020 22:15:05 +0000 (17:15 -0500)
commit171689dac7fcb979e7d3ffbd307eacae3c07c2d3
treeddd9febed20f88719d7eaf2938798a57b0631074
parent7dc2f14bb340bce9a6283dfa7dfde18ec2cb24a2
nss: Introduce <nss_module.h>

This provides the struct nss_module type, which combines the old
struct service_library type with the known_function tree, by
statically allocating space for all function pointers.

struct nss_module is fairly large (536 bytes), but it will be
shared across NSS databases.  The old known_function handling
had non-some per-function overhead (at least 32 bytes per looked-up
function, but more for long function anmes), so overall, this is not
too bad.  Resolving all functions at load time simplifies locking,
and the repeated lookups should be fast because the caches are hot
at this point.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
malloc/set-freeres.c
nss/Makefile
nss/function.def
nss/nss_module.c [new file with mode: 0644]
nss/nss_module.h [new file with mode: 0644]