# HG changeset patch # User Christos Kotselidis # Date 1371805690 -7200 # Node ID e98e021d1e7ec3c5de2c875e4c3ba10306d68095 # Parent 89c15a40ef35f6c72b17ab7a76328e3e62866290 Forbid direct eden allocation when G1 is enabled diff -r 89c15a40ef35 -r e98e021d1e7e graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewInstanceStub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewInstanceStub.java Thu Jun 20 17:30:39 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewInstanceStub.java Fri Jun 21 11:08:10 2013 +0200 @@ -121,6 +121,11 @@ * operation was unsuccessful */ static Word refillAllocate(Word intArrayHub, int sizeInBytes, boolean log) { + // If G1 is enabled, the "eden" allocation space is not the same always + // and therefore we have to go to slowpath to allocate a new TLAB. + if (HotSpotReplacementsUtil.useG1GC()) { + return Word.zero(); + } if (!useTLAB()) { return edenAllocate(Word.unsigned(sizeInBytes), log); }