Example usage for android.os Debug getGlobalAllocSize

List of usage examples for android.os Debug getGlobalAllocSize

Introduction

In this page you can find the example usage for android.os Debug getGlobalAllocSize.

Prototype

@Deprecated
public static int getGlobalAllocSize() 

Source Link

Document

Returns the global size, in bytes, of objects allocated by the runtime between a #startAllocCounting() start and #stopAllocCounting() stop .

Usage

From source file:Main.java

public static long[] getVM() {
    long[] value = new long[5];
    value[0] = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) >> 10;
    value[1] = Runtime.getRuntime().totalMemory() >> 10;

    value[2] = Debug.getNativeHeapAllocatedSize() >> 10;
    value[3] = Debug.getNativeHeapSize() >> 10;
    value[4] = Debug.getGlobalAllocSize() >> 10;
    return value;
}