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();
–
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.
–
–
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.