about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-05-02T17·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-05-02T17·12+0000
commitb52e71191094f564d7b7484b89e47e710bb94bdc (patch)
treeaa36002c9e96b31e258e82c903b08a6db03410b0 /src/nix-env
parent11ae2d1e7af05c3410a368338c7d13a49c2d2ccd (diff)
* Huge reduction in memory use (2/3 or so on large nix-env -qas
  operations): share ATermMaps between DrvInfos.

Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/main.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index f9a0c19a9b63..ad3c1b5ce329 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -348,6 +348,7 @@ static void queryInstSources(EvalState & state,
                 assertStorePath(*i);
 
                 DrvInfo elem;
+                elem.attrs = shared_ptr<ATermMap>(new ATermMap()); /* ugh... */
                 string name = baseNameOf(*i);
                 unsigned int dash = name.find('-');
                 if (dash != string::npos)