当前位置:网站首页>About the largeheap attribute
About the largeheap attribute
2022-07-24 19:23:00 【Martin-Rayman】
Recently, I was studying a project , But the pictures and APP The running memory of is much larger than Android designated 16M Run memory size .
Then Xiaobai asked the gods how to prevent APP OOM error .
So a group of inner gods gave me a clear way .
<application
android:allowBackup="true"
android:icon="@mipmap/icon_app"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppTheme">
</application>This is the sentence largeHeap Helped me solve this problem temporarily .
But usually these good things have two sides , Of course, it's better to use less , About OOM There are more solutions . This is only an expedient .
// The following is Baidu literature
We can do it in AndroidManifest.xml Of application Tag by setting application Under the android:largeHeap attribute ="true"
To inform Dalvik Virtual machine applications need to use larger Java Object Heap.
in fact , On mobile phones with limited memory , Even if we put an application android:largeHeap Property is set to “true”,
It can't be increased Java Object Heap The size of the , Even though it can be increased by this attribute Java Object Heap Size , In general, this attribute should not be used .
In order to improve the overall experience of the system , What we need to do is to reduce the memory requirements of applications , Instead of adding more applications Java Object Heap Size , After all, the total available memory of the system is fixed , An application is used more , It means that other applications are used less .
边栏推荐
- Ebpf verifier
- PCIe link initialization & Training
- PostgreSQL Elementary / intermediate / advanced certification examination (7.16) passed the candidates' publicity
- mysql排序.按字段值排序
- Chapter 4 compound type
- OpenGL learning (IV) glut 3D image rendering
- Equals() method of object class
- [understanding of opportunity-48]: Guiguzi - Chapter 7 - collect information in advance, make predictions and implementation plans in advance
- JVM method call
- Convolutional Neural Networks in TensorFlow quizs on Coursera
猜你喜欢

Sequences, time series and prediction in tessorflow quizs on coursera (I)

How to encrypt your own program with dongle

OPENGL学习(四)GLUT三维图像绘制
思源笔记 v2.1.2 同步问题

OPENGL学习(二)OPENGL渲染管线

FPGA 20 routines: 9. DDR3 memory particle initialization write and read through RS232 (Part 1)

Feature extraction tool transformer Bert
![[JVM learning 04] JMM memory model](/img/8c/0f76be122556301a5af140e34b55f4.png)
[JVM learning 04] JMM memory model

How does PostgreSQL decide PG's backup strategy

Tcl/tk file operation
随机推荐
[understanding of opportunity-49]: three seasons and cognitive dimension
OPENGL学习(二)OPENGL渲染管线
Interceptors and filters
Mysql数据库,去重,连接篇
Pay close attention! List of the latest agenda of 2022 open atom open source Summit
JS part
OPENGL学习(五)Modern OpenGL 三角形绘制
Decision tree_ ID3_ C4.5_ CART
Installation and use of lsky Pro lancong drawing bed: a drawing bed program for online uploading and managing pictures
Meshlab & PCL ISS key points
Process pool and fallback function [easy to understand]
Virbox compiler, which supports source code encryption of the whole platform and architecture
Machine learning_ Softmax function (multi classification problem)
[resolved] CVC datatype valid. 1.2.1: '' is not a valid value for 'ncname'.
Summary of articles in 2020
Nacos introduction and console service installation
LTSpice software power settings
多线程与并发编程常见问题(未完待续)
On dynamic application of binary array
MySQL final chapter