[PATCH] Sun Bug #4879883: Allocating direct buffers
causes OutOfMemoryError
Panagiotis Astithas
past at ebs.gr
Wed Oct 26 14:00:51 PDT 2005
Landon Fuller wrote:
> From http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4879883
> A DESCRIPTION OF THE PROBLEM :
> Allocating a direct byte buffer may give an OutOfMemoryError, even when
> plenty of memory is available. Although not used in the test case
> below, in my application this occurs when reading a socket channel
>
> ----
>
> We ran into this bug with jdk1.4.2; A simple reproduction case is
> included in the referenced Sun bug report.
> This bug was fixed in 1.5.0 and 1.4.2_05.
>
> I've back-ported Sun's changes from the 1.5.0 source. The patch (for
> 1.4.2-p7) is attached below.
>
> Please let me know if you have any questions,
> -landonf
FYI, it works as advertised here. It fixes the reported bug and doesn't
seem to break anything in my testing so far.
Thanks,
Panagiotis
More information about the freebsd-java
mailing list