简体   繁体   English

如何增加AllocSpace的大小?

[英]How can i Increase AllocSpace Size?

I get message on cocsole Background sticky concurrent mark sweep GC freed 99519(10MB) AllocSpace objects, 176(3MB) LOS objects, 19% free, 58MB/73MB, paused 3.941ms total 121.614ms. 我在cocsole上收到消息背景粘性并发标记清除GC释放了99519(10MB)AllocSpace对象,176(3MB)个LOS对象,19%的空闲空间,58MB / 73MB,暂停了3.941ms,总计121.614ms。 But my activity doesnt have many objects 19% free is very small for what i'm preview in activity.How can i increase that? 但是我的活动中没有很多对象19%的免费对于我在活动中预览的对象来说很小,如何增加呢? I used android:largeHeap="true" inside manifest but it didnt worked. 我在清单中使用了android:largeHeap =“ true”,但没有成功。

Why should the Android system allocate more memory to your app than it needs? 为什么Android系统会为应用分配过多的内存? A memory consumption of 10mb is rather small, so that's good. 10mb的内存消耗很小,所以很好。 You don't need android:largeHeap="true" , this is used primarily for video and game applications. 您不需要android:largeHeap="true" ,它主要用于视频和游戏应用程序。
As long as your app doesn't suffer from OutOfMemoryException s there's nothing you need to do. 只要您的应用程序不遭受OutOfMemoryException的困扰,您就不需要做任何事情。 Also, apart from android:largeHeap="true" , there's nothing you can do. 此外,除了android:largeHeap="true" ,没有什么可以做。 It's the OS's job to take care of memory allocation, not yours ;) 负责内存分配,而不是您自己,是操作系统的工作;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM