The default max heap is 64MB, so the first thing I'd try is simply raising that.
By supplying -Xmx128m, on the commandline when you launch your program, you'll
double the limit. There are tools to watch the heap and I recommend that
everyone who is doing a lot with memory make use of them. Things like JProbe
and OptimizeIt are profiling tools, but something free and simple like the heap
monitor from Sun (cool tools)... I'm trying to find the URL... Anyway, it can
help give you a picture of what is happening with the various heap spaces (yes,
there are more than 1). Well, I'm having problems finding it. Perhaps someone
from Sun can chime in.

Best of luck,
David

Quoting "Braun-Friedman, David" <[EMAIL PROTECTED]>:

> Hi all-
>
> Any help witht he following sigue would be much appreciated:
>
> I am writing program in Java2D (and some JAI) to manipulate jpeg images.
> The images are first opened as Tiffs in a thumbnail and then transferred
> into a database through a JPEGEncoder byteinputstream.  They are then
> taken out of the database and displayed in my Java2D viewerPane.  The
> jpegs are of size 150k aprox. And the tiffs of 4 mbs.  Whenever I try to
> do the transformation of the original tiff image to jpeg input stream,
> my program gives me an out of memory error (Java Heap space).  I have
> tried several things but I cannot seem to resolve this problem.  Also
> when I open several viewers witht eh jpeg images, I get the same
> message.  If anyone can give me some insight or interesting links to
> good memory management, that would be great.  I just don't understand
> because I didn't think the images I am using would take up so much space
> that the program crashes so easily.  Surely there are bigger more
> complicated programs with larger image files that do no have the same
> problem I do.  Thanks for any help.
>
>
> David
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to