1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

Make roots a map of store paths to pinning links

This new structure makes more sense as there may be many sources rooting
the same store path. Many profiles can reference the same path but this
is even more true with /proc/<pid>/maps where distinct pids can and
often do map the same store path.
This implementation is also more efficient as the `Roots` map contains
only one entry per rooted store path.
This commit is contained in:
Guillaume Maudoux 2019-03-01 00:54:52 +01:00 committed by Guillaume Maudoux
parent a17f86ce3a
commit ebc86550f9
5 changed files with 39 additions and 35 deletions

View file

@ -47,7 +47,7 @@ const size_t storePathHashLen = 32; // i.e. 160 bits
const uint32_t exportMagic = 0x4558494e;
typedef std::map<Path, Path> Roots;
typedef std::map<Path, std::set<std::string>> Roots;
struct GCOptions