File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Memory Leak in JAI 1.1.1_01 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Memory Leak in JAI 1.1.1_01" Watch "Memory Leak in JAI 1.1.1_01" New topic
Author

Memory Leak in JAI 1.1.1_01

sam cheung
Greenhorn

Joined: Nov 07, 2002
Posts: 5
I am running the following small program which takes a URL (referring to an image), open the inputstream, encode in in BMP and put that in an byte array.
What I find out is the program starts with memory usage 1300K, but if the program continuously running for 6 hours (in a loop), the memory usage will become > 233,000K.
Since I did not specify any hotspot parameter, I expect the memory usage will stay at 64M (the default heap usage for jvm). But from my experiment, the memory usage keeps growing beyond 64M.
Is there a memory leak issue in JAI? I am using Window 2000, JDK 1.4.1_01 and JAI 1.1.1_01.
Thank you for your help.
Sam
// Here is the small program
///////////////////////////////////////////////////////////////////////////////
static private void testURL2(URL url) {
ByteArrayOutputStream stream = null;
try {
InputStream is = url.openStream();
RenderedOp image1 = JAI.create("stream", SeekableStream.wrapInputStream(is, true));
stream = new ByteArrayOutputStream();
JAI.create("encode", image1, stream, "BMP", null);
is.close();
} catch (Exception e) {
}
}
 
 
subject: Memory Leak in JAI 1.1.1_01
 
Threads others viewed
Help with JAI
Convert Ascii String to Tif file format content
Tiff images - get compression type?
JAI rotate leaves 1px black border - why?
Getting the size for an img tag dynamically with struts
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture