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

automerge: 54bab10

* commit '54bab10b1facad1ae8ad522b57785f449f3227f9':
  Enable native tracking for RS contexts to improve GC behavior.
This commit is contained in:
Tim Murray
2014-12-13 00:15:08 +00:00
committed by android-build-merger

View File

@@ -1146,6 +1146,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);
}
}
/**