mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Backend for compact node-family representation.
This representation is meant to save memory in microdescriptors --
we can't use it in routerinfo_t yet, since those families need to be
encoded losslessly for directory voting to work.
This representation saves memory in three ways:
1. It uses only one allocation per family. (The old way used a
smartlist (2 allocs) plus one strdup per entry.)
2. It stores identity digests in binary, not hex.
3. It keeps families in a canonical format, memoizes, and
reference-counts them.
Part of #27359.
This commit is contained in:
@@ -106,6 +106,7 @@ LIBTOR_APP_A_SOURCES = \
|
||||
src/feature/nodelist/microdesc.c \
|
||||
src/feature/nodelist/networkstatus.c \
|
||||
src/feature/nodelist/nickname.c \
|
||||
src/feature/nodelist/nodefamily.c \
|
||||
src/feature/nodelist/nodelist.c \
|
||||
src/feature/nodelist/node_select.c \
|
||||
src/feature/nodelist/routerinfo.c \
|
||||
@@ -340,6 +341,8 @@ noinst_HEADERS += \
|
||||
src/feature/nodelist/networkstatus_voter_info_st.h \
|
||||
src/feature/nodelist/nickname.h \
|
||||
src/feature/nodelist/node_st.h \
|
||||
src/feature/nodelist/nodefamily.h \
|
||||
src/feature/nodelist/nodefamily_st.h \
|
||||
src/feature/nodelist/nodelist.h \
|
||||
src/feature/nodelist/node_select.h \
|
||||
src/feature/nodelist/routerinfo.h \
|
||||
|
||||
Reference in New Issue
Block a user