am a6bfe6c9: Merge "Enable native tracking for RS contexts to improve GC behavior." into lmp-mr1-dev

* commit 'a6bfe6c957739fc172dd97ce4e26d8ec4ee4aa6f':
  Enable native tracking for RS contexts to improve GC behavior.
This commit is contained in:
Tim Murray
2014-12-13 00:10:46 +00:00
committed by Android Git Automerger

View File

@@ -1184,6 +1184,13 @@ public class RenderScript {
mApplicationContext = ctx.getApplicationContext();
}
mRWLock = new ReentrantReadWriteLock();
try {
registerNativeAllocation.invoke(sRuntime, 4 * 1024 * 1024 * 1024); // 4MB for GC sake
} catch (Exception e) {
Log.e(RenderScript.LOG_TAG, "Couldn't invoke registerNativeAllocation:" + e);
throw new RSRuntimeException("Couldn't invoke registerNativeAllocation:" + e);
}
}
/**