Back to project page AndroidMemoryLogger.
The source code is released under:
MIT License
If you think the Android project AndroidMemoryLogger listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.otiasj.memoryLogger.loggers; /*from ww w.ja v a2s . co m*/ import android.util.Log; import com.otiasj.memoryLogger.utils.MemoryUtils; public class MemoryLogger implements OnMemoryLog { @Override public void onLog(final String tag, final double allocated, final double heapSize, final double percent, final double nativeUsed, final double nativeHeapSize) { Log.v(tag, "" + MemoryUtils.decimalFormat.format(allocated) + "/" + MemoryUtils.decimalFormat.format(heapSize) + " " + MemoryUtils.decimalPercentFormat.format(percent) + "%" + MemoryUtils.decimalPercentFormat.format(nativeUsed) + "/" + MemoryUtils.decimalPercentFormat.format(nativeHeapSize)); } }