summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 0fa6befbe..fab9cece3 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -5825,6 +5825,12 @@ class MergeTask(object):
if self._opts_ignore_blockers.intersection(self.myopts):
return None
+ # Call gc.collect() here to avoid heap overflow that
+ # triggers 'Cannot allocate memory' errors (reported
+ # with python-2.5).
+ import gc
+ gc.collect()
+
blocker_dblinks = []
for blocking_pkg in self._blocker_db[
new_pkg.root].findInstalledBlockers(new_pkg,
@@ -5838,6 +5844,8 @@ class MergeTask(object):
self.pkgsettings[blocking_pkg.root], treetype="vartree",
vartree=self.trees[blocking_pkg.root]["vartree"]))
+ gc.collect()
+
return blocker_dblinks
def merge(self, mylist, favorites, mtimedb):