This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/79: Problem creating static arrays
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/79: Problem creating static arrays
- From: green at cygnus dot com
- Date: 1 Nov 1999 04:56:12 -0000
- Reply-To: green at cygnus dot com
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, green@cygnus.com
>Number: 79
>Category: gcj
>Synopsis: Problem creating static arrays
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 31 21:00:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Anthony Green
>Release: Any
>Organization:
>Environment:
IA-32 Linux
>Description:
Imagine a class containing:
private static byte[] aa = new byte[AnotherClass.SIZE_VALUE];
Where AnotherClass contains
public static final short SIZE_VALUE = 300;
It appears as though the array size used during the creation
of aa is garbage. The garbage is often larger than
any reasonable number and the GC will fail to allocate
the memory and die with an `out of memory' message.
Replacing the use of SIZE_VALUE with 300 produces correct
results.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: