[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bugs #8234] BufferedInputStream allocates too much memory (OutOfMemory
From: |
Mark Wielaard |
Subject: |
[bugs #8234] BufferedInputStream allocates too much memory (OutOfMemory w/ gcj) |
Date: |
Fri, 30 Apr 2004 11:46:20 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.14 (Debian package 1.3.14a-1) |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #8234] Latest Modifications:
Changes by:
Mark Wielaard <address@hidden>
'Date:
Fri 04/30/04 at 15:46 (Europe/Amsterdam)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
This has been fixed (in 0.08) byt the following patch:
2004-03-09 Guilhem Lavaux <address@hidden>
* java/io/BufferedInputStream.java (marktarget): New field for max
mark limit.
(CHUNKSIZE): New constant for incremental mark buffer allocation.
(mark): Use new fields.
(read): Likewise.
(read(byte[],int,int)): Likewise.
(skip): Likewise.
(refill): Likewise.
/**************************************************************************/
[bugs #8234] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=8234>
Project: classpath
Submitted by: 0
On: Sun 03/21/04 at 16:45
Severity: 5 - Average
Resolution: Fixed
Assigned to: None
Status: Closed
Platform Version: None
Summary: BufferedInputStream allocates too much memory (OutOfMemory w/ gcj)
Original Submission: BufferedInputStream.reset() contains the following:
// Need to grow the buffer now to have room for marklimit bytes.
// Note that the new buffer is one greater than marklimit.
// This is so that there will be one byte past marklimit to be read
// before having to call refill again, thus allowing marklimit to be
// invalidated. That way refill doesn't have to check marklimit.
byte[] newbuf = new byte[marklimit + 1];
System.arraycopy(buf, 0, newbuf, 0, count);
buf = newbuf;
But, marklimit may be an outrageously large number, as in mauve's BigMark test
case, where we get an OutOfMemory exception on Linux with gcj.
We don't really need to allocate such a large array.
Follow-up Comments
------------------
-------------------------------------------------------
Date: Fri 04/30/04 at 15:46 By: mark
This has been fixed (in 0.08) byt the following patch:
2004-03-09 Guilhem Lavaux <address@hidden>
* java/io/BufferedInputStream.java (marktarget): New field for max
mark limit.
(CHUNKSIZE): New constant for incremental mark buffer allocation.
(mark): Use new fields.
(read): Likewise.
(read(byte[],int,int)): Likewise.
(skip): Likewise.
(refill): Likewise.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=8234>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bugs #8234] BufferedInputStream allocates too much memory (OutOfMemory w/ gcj),
Mark Wielaard <=