|
-
November 18th, 2005, 10:58 AM
#1
garbage collection
i have to validate 250K lines of data. i'm out of memory. what do I do? something with garbage collection???
a Cambece
-
November 22nd, 2005, 10:51 AM
#2
Re: garbage collection
What you should do: Re-write your application so that it doesn't try to hold all the lines into memory at the same time, because that's probably not necessary.
You didn't say anything about what your program does with the data, so it's impossible to give you more specific help.
-
November 22nd, 2005, 12:30 PM
#3
Re: garbage collection
 Originally Posted by feilusun
something with garbage collection???
Both yes and not. Do you need to hold on to that large amount of data (assuming 250K lines, whatever that it is, is a large amount of data). If you don't need all data at the same time, read a little at the time, process it, and then release it for garbage collection.
If you do need all the data at the same time you can increase the heap space available to the JVM (assuming there's memory available in the computer).
-
November 23rd, 2005, 10:26 PM
#4
Re: garbage collection
The poster is asking how to find/ween the memory allocation hog in his 250,000 lines of code.
I have not used the profiler yet but it is integrated into the Netbeans IDE which is free.
http://profiler.netbeans.org/
There are other profilers, just google for java profilers. You can also set higher heap sizes for the jvm with command line switches for java.exe but this won't solve memory hog issues.
"The Chicken and Rice MRE is not a personal lubricant."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|