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

Commit 1cad5d05 authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Steve Kondik
Browse files

native: Restore VM memory overrides

This change adds back the property overrides for several device
types as we had in CM 11.

It contains a squished commit of the following:

commit 5b924092
Author: Steve Kondik <shade@chemlab.org>
Date:   Thu Nov 6 14:40:44 2014 -0800

    Add hdpi-2048 tunings

commit ed579d8b
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jan 4 12:12:00 2014 -0800

    Update HWUI config for xxhdpi/2GB devices

commit 386f220e
Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Aug 6 02:53:19 2013 -0700

    hwui: Update configuration for 2GB/1080p devices

commit b7392d11
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jun 1 14:51:17 2013 +0200

    provide overrides for hwui memory limits for xxhdpi phones

commit 247b3c63
Author: Steve Kondik <shade@chemlab.org>
Date:   Fri May 17 13:10:19 2013 -0700

    Add heap configuration for 1080p phones with 2048m

     * Increase heap start size to 16m to minimize GC with larger bitmaps

commit 9856e939
Author: Andrew Bartholomew <andrewb03@gmail.com>
Date:   Thu Apr 25 13:48:21 2013 -0400

    build/phone-xhdpi-1024-dalvik-heap.mk Revert AOSP heapgrowthlimit change from 64 to 96

    This reverts part of AOSP change at

    https://android.googlesource.com/platform/frameworks/native/+/c84e9844d621223d14178be521

    Possible performance issues have arisen because of it. Discussion at

    http://code.google.com/p/android/issues/detail?id=40961

    Patch Set 2: Clean up commit message

commit bd7fb4be
Author: Bhargav Upperla <bhargavuln@codeaurora.org>
Date:   Thu May 23 12:50:15 2013 -0700

    Configure dalvik heap parameters for low memory devices

    Reduces after boot memory footprint by about 5-8MB
    Note: This is for low memory based devices only (~512MB RAM
    or less)

Change-Id: Id7e1967d18227359ad9631139bfd47e61e494829
parent 689aa6aa
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Provides overrides to configure the Dalvik heap for a 2G phone
# 192m of RAM gives enough space for 5 8 megapixel camera bitmaps in RAM.

PRODUCT_PROPERTY_OVERRIDES += \
    dalvik.vm.heapstartsize=12m \
    dalvik.vm.heapgrowthlimit=128m \
    dalvik.vm.heapsize=256m \
    dalvik.vm.heaptargetutilization=0.75 \
    dalvik.vm.heapminfree=4m
+1 −1
Original line number Diff line number Diff line
@@ -21,5 +21,5 @@ PRODUCT_PROPERTY_OVERRIDES += \
    dalvik.vm.heapgrowthlimit=96m \
    dalvik.vm.heapsize=256m \
    dalvik.vm.heaptargetutilization=0.75 \
    dalvik.vm.heapminfree=512k \
    dalvik.vm.heapminfree=2m \
    dalvik.vm.heapmaxfree=8m
+26 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Provides overrides to configure the Dalvik heap for a 2G phone
# 192m of RAM gives enough space for 5 8 megapixel camera bitmaps in RAM.

PRODUCT_PROPERTY_OVERRIDES += \
    dalvik.vm.heapstartsize=16m \
    dalvik.vm.heapgrowthlimit=192m \
    dalvik.vm.heapsize=512m \
    dalvik.vm.heaptargetutilization=0.75 \
    dalvik.vm.heapminfree=2m \
    dalvik.vm.heapmaxfree=8m
+30 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Provides overrides to configure the HWUI memory limits

PRODUCT_PROPERTY_OVERRIDES += \
    ro.hwui.texture_cache_size=72 \
    ro.hwui.layer_cache_size=48 \
    ro.hwui.r_buffer_cache_size=8 \
    ro.hwui.path_cache_size=32 \
    ro.hwui.gradient_cache_size=1 \
    ro.hwui.drop_shadow_cache_size=6 \
    ro.hwui.texture_cache_flushrate=0.4 \
    ro.hwui.text_small_cache_width=1024 \
    ro.hwui.text_small_cache_height=1024 \
    ro.hwui.text_large_cache_width=2048 \
    ro.hwui.text_large_cache_height=1024