[Biopython-dev] Bio.PDB.KDTree test for memory leak
Kristian Rother
krother at rubor.de
Thu Feb 11 12:31:58 UTC 2010
Hi,
I've encountered a problem with running KDTree: it leaks memory.
The code below fills 1GB memory within a minute.
Running the GC doesn't help (it slows the process down, but only because
the GC is much slower than KDTree.
I think the problem might be in the C code. I'd like to get this bug
sorted out, but I'm not very good in C. Is there anyone around who I could
check ideas with?
Best Regards,
Kristian
----
from Bio.KDTree.KDTree import *
from numpy.random import random
nr_points=1000
dim=3
bucket_size=10
coords=(200*random((nr_points, dim)))
while 1:
kdtree=KDTree(dim, bucket_size)
kdtree.set_coords(coords)
More information about the Biopython-dev
mailing list