16k: Get the page size dynamically

Android V will support page size agnostic targets. For
frameworks, getpagesize() will be used instead of the
hardcoded value for page size.

Bug: 298041921
Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic
      m
Change-Id: I62c94da767a79df9515d5b9cbb93764508a0f023
This commit is contained in:
Juan Yescas 2023-10-02 12:50:53 -07:00
parent 6958a77825
commit ce91a2a742

View File

@ -276,8 +276,8 @@ public final class ProcessList {
// don't have an oom adj assigned by the system).
public static final int NATIVE_ADJ = -1000;
// Memory pages are 4K.
static final int PAGE_SIZE = 4 * 1024;
// Memory page size.
static final int PAGE_SIZE = (int) Os.sysconf(OsConstants._SC_PAGESIZE);
// Activity manager's version of Process.THREAD_GROUP_BACKGROUND
static final int SCHED_GROUP_BACKGROUND = 0;