Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Problem with OutofMemoryError  (Read 4271 times)
0 Members and 1 Guest are viewing this topic.
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #30 - Posted 2004-02-18 20:17:41 »

Quote

I understood it that this is exactly what escape analysis does.

I've never written code to perform escape analysis myself, but off the top of my head, I can think of methods of determining whether an object escapes a scope or not that run in less time than determining the exact last place an object was referenced. Considering that this optimization would be done at runtime, I'm sure you would want it to be as lean as possible.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #31 - Posted 2004-02-18 20:27:07 »

Quote

It is a pity that this is necessary, but I presume that the heap implementation currently requires that the heap address range be contiguous.

Sun's Windows (and perhaps others) JVM requires a contiguous address space, which is the reason for the pitiful 1.4/1.7G heap limit on Windows. I don't see what this has to do with presetting a max heap size, though. I believe, for example, the current 1.5 VM's parallel garbage collector performs automatic heap sizing.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #32 - Posted 2004-02-18 20:39:25 »

Quote

Most of the benefits of escape analysis do come from smal objects; things like iterators and classes implementing complex numbers. The iterator for an ArrayList would be an obvious example that with escape analysis would almost always be reduced down to
for (int i=0; i<list.size(); i++)
{
}

Yes, in general, escape analysis is going to help more with smaller objects - which is a good thing. Because the garbage collector seems to performs the worst when dealing with large numbers of small objects. Anything we can do to lessen its burden is good.

In your example, you seem to be implying that the Iterator object just totally disappears, but I seriously doubt that's going to happen. It's not going to be able to pull out concurrent modification checks, and it probably won't be able to pull out the redundant range checking either. That overhead is just noise in a normal application, but it turns into significant overhead in specialized cases.

To this day, I can't understand why the library code does silly things like perform redundant range checks.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (36 views)
2014-07-18 06:55:21

Zero Volt (34 views)
2014-07-17 23:47:54

danieldean (27 views)
2014-07-17 23:41:23

MustardPeter (30 views)
2014-07-16 23:30:00

Cero (44 views)
2014-07-16 00:42:17

Riven (46 views)
2014-07-14 18:02:53

OpenGLShaders (35 views)
2014-07-14 16:23:47

Riven (35 views)
2014-07-14 11:51:35

quew8 (31 views)
2014-07-13 13:57:52

SHC (67 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!