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

Commit 3d00fdf4 authored by Tim Murray's avatar Tim Murray Committed by Gerrit Code Review
Browse files

Merge "Enable native tracking for RS contexts to improve GC behavior."

parents a101befb aefbd5f9
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1146,6 +1146,13 @@ public class RenderScript {
            mApplicationContext = ctx.getApplicationContext();
            mApplicationContext = ctx.getApplicationContext();
        }
        }
        mRWLock = new ReentrantReadWriteLock();
        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);
        }

    }
    }


    /**
    /**