From 8c85199efecceb6345a0afa19e5268244efd957f Mon Sep 17 00:00:00 2001 From: Vilas Bhat Date: Fri, 22 Mar 2024 20:45:45 +0000 Subject: [PATCH] 16k: core: Change default TARGET_MAX_PAGE_SIZE_SUPPORTED to 16384 Changing TARGET_MAX_PAGE_SIZE_SUPPORTED default from 65536 to 16384 as this would reduce the ELF alignment for files and thereby also decreasing the padding required. Although increased padding does not result in increased disk space (due to holes), it increases file metadata. Reducing ELF alignment also helps reduce page table memory as it reduces number of memory pages utilized / virtual memory address mappings. Test: lunch && get_build_var TARGET_MAX_PAGE_SIZE_SUPPORTED Bug: 310232825 Change-Id: I7c6b1bb699fec8b8ecf49a0f06a79d89142e3a2b --- core/config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/config.mk b/core/config.mk index d7516d337a..c109b1c1b0 100644 --- a/core/config.mk +++ b/core/config.mk @@ -413,7 +413,7 @@ else # When VSR vendor API level >= 34, binary alignment will be 65536. ifeq ($(call math_gt_or_eq,$(VSR_VENDOR_API_LEVEL),34),true) ifeq ($(TARGET_ARCH),arm64) - TARGET_MAX_PAGE_SIZE_SUPPORTED := 65536 + TARGET_MAX_PAGE_SIZE_SUPPORTED := 16384 endif endif endif @@ -432,8 +432,8 @@ TARGET_NO_BIONIC_PAGE_SIZE_MACRO := false ifdef PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO TARGET_NO_BIONIC_PAGE_SIZE_MACRO := $(PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO) ifeq ($(TARGET_NO_BIONIC_PAGE_SIZE_MACRO),true) - ifneq ($(TARGET_MAX_PAGE_SIZE_SUPPORTED),65536) - $(error TARGET_MAX_PAGE_SIZE_SUPPORTED has to be 65536 to support page size agnostic) + ifeq (,$(filter 16384 65536,$(TARGET_MAX_PAGE_SIZE_SUPPORTED))) + $(error TARGET_MAX_PAGE_SIZE_SUPPORTED has to be either 16384 or 65536 to support page size agnostic) endif endif endif