Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09e1c915 authored by Tim Murray's avatar Tim Murray Committed by android-build-merger
Browse files

am a6bfe6c9: Merge "Enable native tracking for RS contexts to improve GC...

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

* commit 'efc5ceaa':
  Enable native tracking for RS contexts to improve GC behavior.
parents 7f3a73c7 efc5ceaa
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
        }

    }

    /**