1 |
Author: zmedico |
2 |
Date: 2008-06-19 04:09:06 +0000 (Thu, 19 Jun 2008) |
3 |
New Revision: 10722 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/emerge |
7 |
Log: |
8 |
Bug #228075 - Explicitly call gc.collect() to try and free memory |
9 |
when checking for blockers. This avoids a heap overflow that triggers |
10 |
'Cannot allocate memory' errors (reported with python-2.5). |
11 |
(trunk r10717) |
12 |
|
13 |
|
14 |
Modified: main/branches/2.1.2/bin/emerge |
15 |
=================================================================== |
16 |
--- main/branches/2.1.2/bin/emerge 2008-06-19 04:00:59 UTC (rev 10721) |
17 |
+++ main/branches/2.1.2/bin/emerge 2008-06-19 04:09:06 UTC (rev 10722) |
18 |
@@ -5917,6 +5917,12 @@ |
19 |
if self._opts_ignore_blockers.intersection(self.myopts): |
20 |
return None |
21 |
|
22 |
+ # Call gc.collect() here to avoid heap overflow that |
23 |
+ # triggers 'Cannot allocate memory' errors (reported |
24 |
+ # with python-2.5). |
25 |
+ import gc |
26 |
+ gc.collect() |
27 |
+ |
28 |
blocker_dblinks = [] |
29 |
for blocking_pkg in self._blocker_db[ |
30 |
new_pkg.root].findInstalledBlockers(new_pkg, |
31 |
@@ -5930,6 +5936,8 @@ |
32 |
self.pkgsettings[blocking_pkg.root], treetype="vartree", |
33 |
vartree=self.trees[blocking_pkg.root]["vartree"])) |
34 |
|
35 |
+ gc.collect() |
36 |
+ |
37 |
return blocker_dblinks |
38 |
|
39 |
def merge(self, mylist, favorites, mtimedb): |
40 |
|
41 |
-- |
42 |
gentoo-commits@l.g.o mailing list |