Bookmark Topic Watch Topic
  • New Topic

Avoid Memory allocation & dallocation  RSS feed

 
Purujit Saha
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have an application which needs to read millions of xml data file through java IO & needs to extract characters( not java parser).
......
FileReader x_frd=new FileReader(file);
BufferedReader br=new BufferedReader(x_frd);

while((str=br.readLine())!=null)
{
......
........
}

So, whenever i am reading a file, its allocating memory for FileReader,BufferedReader...& again deallocating memory..
Now my question is, Is there any way to avoid this memory allocation / deallocation can be avoided & declear some global variables over there...

Plz Suggest...
[ November 02, 2005: Message edited by: Purujit Saha ]
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question in multiple forums.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!