File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes usage a memory in processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "usage a memory in processing " Watch "usage a memory in processing " New topic
Author

usage a memory in processing

Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
Recently, I am testing the program for performance. However, the program is taking lots of memory than expected in processing.
Thus, I tried to use min/max heap memory in run command. it's still taking the memory about 300MB or 350MB.

Please advice anything what I need to check or test with something else.. or what problem with the program.

welcome any comments.

regards,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Don't know myself, but other people have had rather similar problems recently. Look here, and here, and here, and here. I hope there aren't too many duplicates amongst those links. See whether any of them is of any use to you.
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
Thanks a lot, Campbell!
I trying to see the freemeory before clear() and after use System.gc().

1. I wonder whether the application(program) use System.gc() in processing

if the program is holding the memory in processing until complete, how do I check and what I can verify the processing to release the memory.

many thanks,
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
You do not need to call System.gc() and you should not do so, in 99.9% of cases.

The system will never throw OutOfMemoryError when GC could free enough memory to service a request for memory.

The JVM's decisions about resizing the Java heap (if you have it configured to be resizable) are based on the true amount of memory used, not dead memory that has not been GCd yet.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
thanks, got it.
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
thanks, got it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: usage a memory in processing