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:
parent
a17f86ce3a
commit
ebc86550f9
5 changed files with 39 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue