[Bioperl-l] Possible memory leak in Bio::SeqFeature::Gene::GeneStructure?

Hilmar Lapp hlapp at gmx.net
Wed Mar 30 12:13:54 EST 2005


Those modules probably can use some serious review. If there is a cycle 
then Jason should be on the right path with overriding DESTROY, but 
first one would need to know where the cycle is. I don't recall one 
being there on purpose ...

Sorry to not be of more help ...

	-hilmar

On Tuesday, March 29, 2005, at 01:14  PM, Stefan Kirov wrote:

> I am working on the Entrezgene parser and tried to use 
> Bio::SeqFeature::Gene::GeneStructure to describe NC/NT to NM and NP 
> relationships. I am pretty much done with the parser (based on Mingyi 
> Liu low lovel parser), but once I tried to parse a whole file (Homo 
> sapiens) I ran out of memory. I think the problem might be 
> Bio::SeqFeature::Gene::GeneStructure::add_Transcript.
> Here is the code which I used to simulate the problem and the 
> resulting report file. It seams adding Bio::SeqFeature::Gene::Exon to 
> Bio::SeqFeature::Gene::Transcript do not contribute to the problem.
> Any suggestions?
> Stefan
> Simulation 2	0MB
> Simulation 3	1MB
> Simulation 4	1MB
> Simulation 5	1MB
> Simulation 6	2MB
> Simulation 7	2MB
> Simulation 8	2MB
> Simulation 9	2MB
> Simulation 10	3MB
> Simulation 11	3MB
> Simulation 12	3MB
> Simulation 13	4MB
> Simulation 14	4MB
> Simulation 15	4MB
> Simulation 16	5MB
> Simulation 17	5MB
> Simulation 18	5MB
> Simulation 19	5MB
> Simulation 20	6MB
> Simulation 21	6MB
> Simulation 22	6MB
> Simulation 23	7MB
> Simulation 24	7MB
> Simulation 25	7MB
> Simulation 26	8MB
> Simulation 27	8MB
> Simulation 28	8MB
> Simulation 29	9MB
> Simulation 30	9MB
> Simulation 31	9MB
> Simulation 32	9MB
> Simulation 33	10MB
> Simulation 34	10MB
> Simulation 35	10MB
> Simulation 36	11MB
> Simulation 37	11MB
> Simulation 38	11MB
> Simulation 39	12MB
> Simulation 40	12MB
> Simulation 41	12MB
> Simulation 42	13MB
> Simulation 43	13MB
> Simulation 44	13MB
> Simulation 45	13MB
> Simulation 46	14MB
> Simulation 47	14MB
> Simulation 48	14MB
> Simulation 49	15MB
> Simulation 50	15MB
> Simulation 51	15MB
> Simulation 52	16MB
> Simulation 53	16MB
> Simulation 54	16MB
> Simulation 55	16MB
> Simulation 56	17MB
> Simulation 57	17MB
> Simulation 58	17MB
> Simulation 59	18MB
> Simulation 60	18MB
> Simulation 61	18MB
> Simulation 62	19MB
> Simulation 63	19MB
> Simulation 64	19MB
> Simulation 65	19MB
> Simulation 66	20MB
> Simulation 67	20MB
> Simulation 68	20MB
> Simulation 69	21MB
> Simulation 70	21MB
> Simulation 71	21MB
> Simulation 72	22MB
> Simulation 73	22MB
> Simulation 74	22MB
> Simulation 75	23MB
> Simulation 76	23MB
> Simulation 77	23MB
> Simulation 78	24MB
> Simulation 79	24MB
> Simulation 80	24MB
> Simulation 81	24MB
> Simulation 82	25MB
> Simulation 83	25MB
> Simulation 84	25MB
> Simulation 85	26MB
> Simulation 86	26MB
> Simulation 87	26MB
> Simulation 88	27MB
> Simulation 89	27MB
> Simulation 90	27MB
> Simulation 91	27MB
> Simulation 92	28MB
> Simulation 93	28MB
> Simulation 94	28MB
> Simulation 95	29MB
> Simulation 96	29MB
> Simulation 97	29MB
> Simulation 98	30MB
> Simulation 99	30MB
> Simulation 100	30MB
> 6620	6650
> use Bio::SeqFeature::Gene::Exon;
> use Bio::SeqFeature::Gene::Transcript;
> use Bio::SeqFeature::Gene::GeneStructure;
> use strict;
> use Devel::Cycle;
>
> my ($prevmem,$growth,$first);
> for my $k (1..100) {
> open (FREE, "free -m|");
> my $buf=<FREE>;
> my $buf=<FREE>;
> my ($x1,$x2,$mem,$x3)=split(/\s+/,$buf,4);
> if ($prevmem) {
> 	$growth+= $mem-$prevmem;
> 	print "Simulation $k\t$growth","MB\n";
> }
> else { $first=$mem;}
> $prevmem=$mem;
> for my $i (1..20) {
> my $gstruct=new Bio::SeqFeature::Gene::GeneStructure;
> for my $n (0..3) {
> my $transcript=new 
> Bio::SeqFeature::Gene::Transcript(-primary=>'memleak'.$n,
>                                           
> -start=>1,-end=>2000,-strand=>, -desc=>'test for memmory leaks');
>
>
> foreach my $e (1.10) {
>     my $exonobj=new 
> Bio::SeqFeature::Gene::Exon(-start=>$e*10,-end=>$e*10+9,-strand=>1);
>     $transcript->add_exon($exonobj);
> }
> $gstruct->add_transcript($transcript);
> }
> }
> }
> print 
> "$first\t$prevmem\n";_______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list