Rev 4713: (jam) Fix a memory leak w/ bencode.Encoder() not cleaning up in file:///home/pqm/archives/thelove/bzr/2.0/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Dec 21 02:06:08 GMT 2009
At file:///home/pqm/archives/thelove/bzr/2.0/
------------------------------------------------------------
revno: 4713 [merge]
revision-id: pqm at pqm.ubuntu.com-20091221020607-39aj3xnhja6hjfqe
parent: pqm at pqm.ubuntu.com-20091218170035-kas8ryyoom4x2uti
parent: john at arbash-meinel.com-20091218220309-g1cj97z7cp2nxjvi
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.0
timestamp: Mon 2009-12-21 02:06:07 +0000
message:
(jam) Fix a memory leak w/ bencode.Encoder() not cleaning up
allocated mem.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/_bencode_pyx.pyx bencode.pyx-20070806220735-j75g4ebfnado2i60-3
=== modified file 'NEWS'
--- a/NEWS 2009-12-15 22:04:24 +0000
+++ b/NEWS 2009-12-18 22:03:09 +0000
@@ -8,7 +8,7 @@
bzr 2.0.4 (not released yet)
############################
-:Codename: template
+:Codename:
:2.0.4: ???
Compatibility Breaks
@@ -25,6 +25,12 @@
exporting over the network significantly faster (54min => 9min in one
case). (John Arbash Meinel, #343218)
+* ``bzr serve`` no longer slowly leaks memory. The compiled
+ ``bzrlib.bencode.Encoder()`` class was using ``__del__`` to cleanup and
+ free resources, and it should have been using ``__dealloc__``.
+ This will likely have an impact on any other process that is serving for
+ an extended period of time. (John Arbash Meinel, #494406)
+
Improvements
************
=== modified file 'bzrlib/_bencode_pyx.pyx'
--- a/bzrlib/_bencode_pyx.pyx 2009-06-05 01:48:32 +0000
+++ b/bzrlib/_bencode_pyx.pyx 2009-12-18 21:58:32 +0000
@@ -261,7 +261,7 @@
self.maxsize = maxsize
self.tail = p
- def __del__(self):
+ def __dealloc__(self):
free(self.buffer)
self.buffer = NULL
self.maxsize = 0
More information about the bazaar-commits
mailing list