Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any word on large heap support



I just built gcj this afternoon.

[82-44-212-193:~/Documents/Work] john% ./a.out
134619136
268972032
414638080
560304128
706445312
852586496
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
998727680
1135841280
1272954880
1410068480
1547182080
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
1683435520
1819688960
1955942400
2092195840
-2066518016
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
-1930264576
-1793380352
-1656496128
-1519611904
-1382727680
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
-1245843456
-1108959232
GC Warning: Out of Memory! Returning NIL!
Exception in thread "main" java.lang.OutOfMemoryError
<<No stacktrace available>>

On 29 Apr 2004, at 17:55, Joshua Smith wrote:

On Apr 29, 2004, at 12:14 PM, Michael Latta wrote (off list):

Can GCJ handle run-time class loaders? We use that extensively. We also need to run on PCs.

Michael

On Apr 29, 2004, at 9:09 AM, Joshua Smith wrote (off list):

Have you tried compiling with GCJ? I don't know whether it has those limitations...

On Apr 29, 2004, at 1:51 AM, Michael Latta wrote:

Yes I know. It just kills me to have 4GB of ram and get "OutOfMemoryError" all the time!! So I filed an enhancement request.

Michael


I just learned about gcj recently from this list, so I don't know much. I have read that it works on PC, Mac and Linux, and a quick experiment I did on linux (it's bundled with Red Hat) confirmed that Class.forName does the right thing. From what I've read, AWT peers are not available, so people doing GUI work have been getting by with SWT.

I just did a quick test on Linux using this program:

public class mt
{
public static void main(String args[])
{
int [][] mem = new int[1000][];
for (int i=0;i<1000;++i)
{
mem[i] = new int[1024*1024*32];
System.err.println(Runtime.getRuntime().totalMemory());
}
}
}

I got this output:

[jesmith]$ gcj -o mt --main=mt mt.java
[jesmith]$ ./mt
134619136
268972032
403324928
537677824
672030720
806383616
940736512
1091735552
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
1242734592
1393733632
1544732672
1691021312
1837309952
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
1983598592
2129887232
-2018791424
-1872502784
-1727295488
GC Warning: Repeated allocation of very large block (appr. size 134221824):
May lead to memory leak and poor performance.
-1582088192
-1436880896
GC Warning: Out of Memory! Returning NIL!

So it appears that there is no artificial 2 GB limit. Perhaps someone who has GCJ on their Mac could run this test for us, and see what happens?
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Any word on large heap support (From: Michael Latta <email@hidden>)
 >Re: Any word on large heap support (From: Michael Latta <email@hidden>)
 >Re: Any word on large heap support (From: Joshua Smith <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.