开发者

android garbage collector lingo

开发者 https://www.devze.com 2023-01-12 14:28 出处:网络
Trying to find some information on the GC. In my l开发者_开发百科og i see these entrie often: 08-19 22:35:27.513: DEBUG/dalvikvm(1981): GC_EXPLICIT freed 93 objects / 3160 bytes in 999ms

Trying to find some information on the GC. In my l开发者_开发百科og i see these entrie often:

08-19 22:35:27.513: DEBUG/dalvikvm(1981): GC_EXPLICIT freed 93 objects / 3160 bytes in 999ms
08-19 22:35:28.256: DEBUG/dalvikvm(2331): GC_FOR_MALLOC freed 15082 objects / 523496 bytes in 47ms

whats the difference between the 2?


When you call System.gc(), a GC_EXPLICIT garbage collection will happen some time in the future. Malloc is a C term and function for allocating memory. A GC for malloced memory will be the system cleaning up your dead java variables because they are no longer in use. (This is done automatically as needed).

0

精彩评论

暂无评论...
验证码 换一张
取 消