ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49326] OutOfMemoryError: Map failed
Date Sat, 22 May 2010 20:02:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49326

--- Comment #3 from J.M. (Martijn) Kruithof <jkf@apache.org> 2010-05-22 16:02:19 EDT
---
Well when reading the bug reports, it seems this would not be enough.

Currently I wrote down this:
with MAX_IO_CHUNCK_SIZE = 10MiB

                long count = srcChannel.size();
                while (position < count) {
                    long chunck = Math.min(MAX_IO_CHUNCK_SIZE, count -
position);
                    position +=
                        srcChannel.transferTo(position, chunck,
                                              destChannel);
                    System.gc();
                    System.runFinalization();
                }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message