添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
飞翔的领带  ·  Monitoring and ...·  1 周前    · 
爱旅游的硬币  ·  Memory-efficient ...·  6 天前    · 
奋斗的香蕉  ·  Demystifying C++ - ...·  3 天前    · 
无邪的楼房  ·  glDeleteTextures ...·  2 天前    · 
低调的风衣  ·  QOpenglWidget memory ...·  2 天前    · 
谦逊的苦瓜  ·  How can I convert a ...·  3 月前    · 
稳重的钥匙  ·  杭温铁路即将开通 ...·  3 月前    · 
力能扛鼎的夕阳  ·  跨越千里送电 ...·  4 月前    · 
斯文的酱肘子  ·  常见问题 — Silkpay.cn·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

While running, i get this in my android monitor, it keeps expanding with no ends :

09-02 14:01:36.150 25666-25671/... I/zygote: Do partial code cache collection, code=30KB, data=27KB
09-02 14:01:36.150 25666-25671/... I/zygote: After code cache collection, code=30KB, data=27KB
09-02 14:01:36.151 25666-25671/... I/zygote: Increasing code cache capacity to 128KB
09-02 14:01:39.064 25666-25671/... I/zygote: Do partial code cache collection, code=59KB, data=53KB
09-02 14:01:39.066 25666-25671/...r I/zygote: After code cache collection, code=59KB, data=53KB
09-02 14:01:39.066 25666-25671/... I/zygote: Increasing code cache capacity to 256KB
09-02 14:01:46.287 25666-25671/... I/zygote: Do full code cache collection, code=123KB, data=94KB
09-02 14:01:46.298 25666-25671/... I/zygote: After code cache collection, code=97KB, data=59KB
09-02 14:01:53.853 25666-25671/... I/zygote: Do partial code cache collection, code=122KB, data=90KB
09-02 14:01:53.853 25666-25671/... I/zygote: After code cache collection, code=122KB, data=90KB
09-02 14:01:53.853 25666-25671/... I/zygote: Increasing code cache capacity to 512KB

Here is the code :

CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
for (int i = 0; i < IDs.size(); i++) {
    InputStream inputStream = new URL("https://awebsite/" + IDs.get(i)).openStream();
    inputStream.close();
                I am working on real Android Device ( Lenovo TB-X704L having 3 GB RAM). But my apps UI stucks.
– hasnain_ahmad
                Nov 4, 2019 at 6:19

The answer can be found at the official documentations:

https://developer.android.com/topic/performance/memory-overview

The Android Runtime (ART) and Dalvik virtual machine use paging and memory-mapping (mapping) to manage memory. This means that any memory an app modifies—whether by allocating new objects or touching mapped pages—remains resident in RAM and cannot be paged out. The only way to release memory from an app is to release object references that the app holds, making the memory available to the garbage collector.

Garbage collection

A managed memory environment, like the ART or Dalvik virtual machine keeps track of each memory allocation.

In a virtual machine, it's happening but in a Physical device, the result is different. The Garbage collector cleans or needs to clean whatever is not in use anymore.

I am working on real Android Device ( Lenovo TB-X704L having 3 GB RAM). But my apps UI still stucks. – hasnain_ahmad Nov 4, 2019 at 6:23 May you need to see, what's happening with your app. Probably an error has made it stuck. – Mauro Rocha Jul 21, 2020 at 19:50

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.