use of org.mmtk.harness.exception.OutOfMemory in project JikesRVM by JikesRVM.
the class AllocUserOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
ObjectReference object;
try {
object = env.alloc(refCount, dataCount, getDoubleAlign(frame), site);
} catch (OutOfMemory e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Error allocating object id:" + ObjectModel.lastObjectId() + " refs:" + refCount + " ints: " + dataCount + " align:" + getDoubleAlign(frame) + " site:" + site, e);
}
setResult(frame, new ObjectValue(object));
if (Harness.gcEveryAlloc()) {
env.gc();
}
}
use of org.mmtk.harness.exception.OutOfMemory in project JikesRVM by JikesRVM.
the class AllocOp method exec.
@Override
public void exec(Env env) {
StackFrame frame = env.top();
ObjectReference object;
try {
object = env.alloc(getRefCount(frame), getDataCount(frame), getDoubleAlign(frame), site);
} catch (OutOfMemory e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Error allocating object id:" + ObjectModel.lastObjectId() + " refs:" + getRefCount(frame) + " ints: " + getDataCount(frame) + " align:" + getDoubleAlign(frame) + " site:" + site, e);
}
setResult(frame, new ObjectValue(object));
if (Harness.gcEveryAlloc()) {
env.gc();
}
}
Aggregations