This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj/79: Problem creating static arrays



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]