Monitoring the memory footprint
Memory footprints are the signs and ways of using memory during runtime. From the point of game memory usage optimization, monitoring the memory footprint is very important:
Checking log messages
Checking heap updates
Tracking memory allocation
Checking overall memory usage
Tracking memory leaks
Checking log messages
Using log messages has been the most effective and immediate debugging technique. Message logs are very useful for tracking the program control flow and runtime object tracking.
Dalvik message log
The Dalvik message log is useful for tracking memory. Whenever garbage collection happens, the garbage collector can print the following information through Dalvik log messaging:
Garbage collection reason: This info reveals the reason for triggering garbage collection. The reasons can be
GC_CONCURRENT
,GC_FOR_MALLOC
,GC_HPROF_DUMP_HEAP
,GC_EXPLICIT
, orGC_EXTERNAL_ALLOC
.Amount of memory freed: This section states the amount of memory freed by the garbage collector...