Dear List, I meet a problem about memory release in x10 code as below shows. I try to read many large files step by step, as 5 times in the code. For each step, the DistArray is initialized firstly, and then reading the strings at each place. The problem is that: after the first step, when K==2, I observed that the memory usage does not decrease, and so do the following steps. It leads the program failed at last for that all the memory has gone.
So it means that the contents of Read(place) in the previous step still exist in the memory, even when the DistArray has been initialized. Is there any method to solve this problem? Thanks a lot! Long val N:Int=Place.MAX_PLACES; for (var K:int=0;K<5;K++){ val r:Region=0..(N-1); val d:Dist=Dist.makeBlock(r); val Read=DistArray.make[ArrayBuilder[String]](d); finish for( p in Read.dist.places()) { at (p) async { Read(here.id)=new ArrayBuilder[String](); } } finish for( p in Place.places()){ at (p) async { Read(here.id).add(MANY STRINGS) //processing the strings in Read(here.id); } } } //end for K ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users