unfortunately, it seems that the mapped memory into disk only solves one part 
of the problem (smaller memory fingerprint), see

                File file = File.createTempFile("hugeImage","tmp");
                //file.deleteOnExit();
                FileChannel rwChannel = new RandomAccessFile(file, 
"rw").getChannel();

                int size = (int)(1.79*1024*1024*1024);
                ByteBuffer wrBuf = 
rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, size);
                ByteBuffer wrBuf2 = 
rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, size); <<<<

the indicated line will throw an exception like this

Exception in thread "main" java.io.IOException: Cannot allocate memory
        at sun.nio.ch.FileChannelImpl.map0(Native Method)
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:705)

so it seems that, under 32-bit environment, there's no way out.

:-(

best regards

K.
[Message sent by forum member 'shikida' (shikida)]

http://forums.java.net/jive/thread.jspa?messageID=204993

===========================================================================
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