Hi Fern,

Yes, this is a bug, but a well known one, unfortunately.    We're not far from having it fixed for good.  See [1].

The problem is that we statically partition virtual address space and your large arrays are larger than the address space allocated to the LOS (large object space), although not larger than the total available memory.

If you need a solution immediately, you can do one of two things:

a) apply the most recent patch at [1] (this requires that you be working at or near the svn head), or
b) as a clumsy hack, modify PLOS_FRAC in org.mmtk.plan.Plan to a (much larger value) [2].  This is the constant that determines how much of the available address space is made available to the PLOS (large object space for primitive (non-reference) types).

I'm hoping that I'll have time to square this issue away toward the end of next week.  So if you can wait that long, the bug should be fixed in svn (but of course I can't promise).

Cheers,

--Steve

[1] http://jira.codehaus.org/browse/RVM-157
[2]   public static final float PLOS_FRAC = (float) 0.07;

On 01/09/2007, at 9:13 AM, Fern Moon wrote:

I just ran a benchmark on rvm, but there are out of memory errors.
I am sure the error is not caused by  stack or heap size settings.

The Test.java program is simple:

import java.io.*;
import java.util.*;

public class Test
{

    public static void main(String argv[])
    {

     double[] data = new double[10000 * 1000];
     double[] data1 = new double[10000 * 1000];

}}



I run it by rvm (heap size 500M -- 800M )
rvm -Xms1040M -Xmx1040M -X:gc:variableSizeHeap=true -X:verbose -X:verboseBoot=1 -X:gc:verbose=3 Test 1
It will produce errors.
.....
                     reserved = 91 MB (23416 pgs)      total = 1040 MB (266240 pgs)
    Collection time: 19.83 ms
Live ratio 0.08
GCLoad     0.98
Heap adjustment factor is 1.00
  [POLL] plos: Triggering collection
Exception in thread "main": java.lang.OutOfMemoryError
   at Test.main(Test.java:20)
JikesRVM: exit 113

But if I run it by sun java
 java -Xms1040M -Xmx1040M Test 1
It will produce right result.


Thanks for your help

Fern
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers