Program: 1236
Project: 1236
Buggy source:
private void dumpMemInfo(PrintWriter pw,Debug.MemoryInfo memInfo,boolean checkin,boolean dumpInfo,boolean dumpDalvik){
  long nativeMax=Debug.getNativeHeapSize() / 1024;
  long nativeAllocated=Debug.getNativeHeapAllocatedSize() / 1024;
  long nativeFree=Debug.getNativeHeapFreeSize() / 1024;
  Runtime runtime=Runtime.getRuntime();
  long dalvikMax=runtime.totalMemory() / 1024;
  long dalvikFree=runtime.freeMemory() / 1024;
  long dalvikAllocated=dalvikMax - dalvikFree;
  long viewInstanceCount=ViewDebug.getViewInstanceCount();
  long viewRootInstanceCount=ViewDebug.getViewRootImplCount();
  long appContextInstanceCount=Debug.countInstancesOfClass(ContextImpl.class);
  long activityInstanceCount=Debug.countInstancesOfClass(Activity.class);
  int globalAssetCount=AssetManager.getGlobalAssetCount();
  int globalAssetManagerCount=AssetManager.getGlobalAssetManagerCount();
  int binderLocalObjectCount=Debug.getBinderLocalObjectCount();
  int binderProxyObjectCount=Debug.getBinderProxyObjectCount();
  int binderDeathObjectCount=Debug.getBinderDeathObjectCount();
  long openSslSocketCount=Debug.countInstancesOfClass(OpenSSLSocketImpl.class);
  SQLiteDebug.PagerStats stats=SQLiteDebug.getDatabaseInfo();
  if (checkin) {
    String processName=(mBoundApplication != null) ? mBoundApplication.processName : "String_Node_Str";
    pw.print(ACTIVITY_THREAD_CHECKIN_VERSION);
    pw.print(',');
    pw.print(Process.myPid());
    pw.print(',');
    pw.print(processName);
    pw.print(',');
    pw.print(nativeMax);
    pw.print(',');
    pw.print(dalvikMax);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeMax + dalvikMax);
    pw.print(',');
    pw.print(nativeAllocated);
    pw.print(',');
    pw.print(dalvikAllocated);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeAllocated + dalvikAllocated);
    pw.print(',');
    pw.print(nativeFree);
    pw.print(',');
    pw.print(dalvikFree);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeFree + dalvikFree);
    pw.print(',');
    pw.print(memInfo.nativePss);
    pw.print(',');
    pw.print(memInfo.dalvikPss);
    pw.print(',');
    pw.print(memInfo.otherPss);
    pw.print(',');
    pw.print(memInfo.getTotalPss());
    pw.print(',');
    pw.print(memInfo.nativeSwappablePss);
    pw.print(',');
    pw.print(memInfo.dalvikSwappablePss);
    pw.print(',');
    pw.print(memInfo.otherSwappablePss);
    pw.print(',');
    pw.print(memInfo.getTotalSwappablePss());
    pw.print(',');
    pw.print(memInfo.nativeSharedDirty);
    pw.print(',');
    pw.print(memInfo.dalvikSharedDirty);
    pw.print(',');
    pw.print(memInfo.otherSharedDirty);
    pw.print(',');
    pw.print(memInfo.getTotalSharedDirty());
    pw.print(',');
    pw.print(memInfo.nativeSharedClean);
    pw.print(',');
    pw.print(memInfo.dalvikSharedClean);
    pw.print(',');
    pw.print(memInfo.otherSharedClean);
    pw.print(',');
    pw.print(memInfo.getTotalSharedClean());
    pw.print(',');
    pw.print(memInfo.nativePrivateDirty);
    pw.print(',');
    pw.print(memInfo.dalvikPrivateDirty);
    pw.print(',');
    pw.print(memInfo.otherPrivateDirty);
    pw.print(',');
    pw.print(memInfo.getTotalPrivateDirty());
    pw.print(',');
    pw.print(memInfo.nativePrivateClean);
    pw.print(',');
    pw.print(memInfo.dalvikPrivateClean);
    pw.print(',');
    pw.print(memInfo.otherPrivateClean);
    pw.print(',');
    pw.print(memInfo.getTotalPrivateClean());
    pw.print(',');
    for (int i=0; i < Debug.MemoryInfo.NUM_OTHER_STATS; i++) {
      pw.print(Debug.MemoryInfo.getOtherLabel(i));
      pw.print(',');
      pw.print(memInfo.getOtherPss(i));
      pw.print(',');
      pw.print(memInfo.getOtherSwappablePss(i));
      pw.print(',');
      pw.print(memInfo.getOtherSharedDirty(i));
      pw.print(',');
      pw.print(memInfo.getOtherSharedClean(i));
      pw.print(',');
      pw.print(memInfo.getOtherPrivateDirty(i));
      pw.print(',');
      pw.print(memInfo.getOtherPrivateClean(i));
      pw.print(',');
    }
    pw.print(viewInstanceCount);
    pw.print(',');
    pw.print(viewRootInstanceCount);
    pw.print(',');
    pw.print(appContextInstanceCount);
    pw.print(',');
    pw.print(activityInstanceCount);
    pw.print(',');
    pw.print(globalAssetCount);
    pw.print(',');
    pw.print(globalAssetManagerCount);
    pw.print(',');
    pw.print(binderLocalObjectCount);
    pw.print(',');
    pw.print(binderProxyObjectCount);
    pw.print(',');
    pw.print(binderDeathObjectCount);
    pw.print(',');
    pw.print(openSslSocketCount);
    pw.print(',');
    pw.print(stats.memoryUsed / 1024);
    pw.print(',');
    pw.print(stats.memoryUsed / 1024);
    pw.print(',');
    pw.print(stats.pageCacheOverflow / 1024);
    pw.print(',');
    pw.print(stats.largestMemAlloc / 1024);
    for (int i=0; i < stats.dbStats.size(); i++) {
      DbStats dbStats=stats.dbStats.get(i);
      pw.print(',');
      pw.print(dbStats.dbName);
      pw.print(',');
      pw.print(dbStats.pageSize);
      pw.print(',');
      pw.print(dbStats.dbSize);
      pw.print(',');
      pw.print(dbStats.lookaside);
      pw.print(',');
      pw.print(dbStats.cache);
      pw.print(',');
      pw.print(dbStats.cache);
    }
    pw.println();
    return;
  }
  printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.nativePss,memInfo.nativeSwappablePss,memInfo.nativeSharedDirty,memInfo.nativePrivateDirty,memInfo.nativeSharedClean,memInfo.nativePrivateClean,nativeMax,nativeAllocated,nativeFree);
  printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.dalvikPss,memInfo.dalvikSwappablePss,memInfo.dalvikSharedDirty,memInfo.dalvikPrivateDirty,memInfo.dalvikSharedClean,memInfo.dalvikPrivateClean,dalvikMax,dalvikAllocated,dalvikFree);
  int otherPss=memInfo.otherPss;
  int otherSwappablePss=memInfo.otherSwappablePss;
  int otherSharedDirty=memInfo.otherSharedDirty;
  int otherPrivateDirty=memInfo.otherPrivateDirty;
  int otherSharedClean=memInfo.otherSharedClean;
  int otherPrivateClean=memInfo.otherPrivateClean;
  for (int i=0; i < Debug.MemoryInfo.NUM_OTHER_STATS; i++) {
    final int myPss=memInfo.getOtherPss(i);
    final int mySwappablePss=memInfo.getOtherSwappablePss(i);
    final int mySharedDirty=memInfo.getOtherSharedDirty(i);
    final int myPrivateDirty=memInfo.getOtherPrivateDirty(i);
    final int mySharedClean=memInfo.getOtherSharedClean(i);
    final int myPrivateClean=memInfo.getOtherPrivateClean(i);
    if (myPss != 0 || mySharedDirty != 0 || myPrivateDirty != 0 || mySharedClean != 0 || myPrivateClean != 0) {
      printRow(pw,HEAP_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,mySharedDirty,myPrivateDirty,mySharedClean,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
      otherPss-=myPss;
      otherSwappablePss-=mySwappablePss;
      otherSharedDirty-=mySharedDirty;
      otherPrivateDirty-=myPrivateDirty;
      otherSharedClean-=mySharedClean;
      otherPrivateClean-=myPrivateClean;
    }
  }
  printRow(pw,HEAP_COLUMN,"String_Node_Str",otherPss,otherSwappablePss,otherSharedDirty,otherPrivateDirty,otherSharedClean,otherPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
  printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.getTotalPss(),memInfo.getTotalSwappablePss(),memInfo.getTotalSharedDirty(),memInfo.getTotalPrivateDirty(),memInfo.getTotalSharedClean(),memInfo.getTotalPrivateClean(),nativeMax + dalvikMax,nativeAllocated + dalvikAllocated,nativeFree + dalvikFree);
  if (dumpDalvik) {
    pw.println("String_Node_Str");
    pw.println("String_Node_Str");
    for (int i=Debug.MemoryInfo.NUM_OTHER_STATS; i < Debug.MemoryInfo.NUM_OTHER_STATS + Debug.MemoryInfo.NUM_DVK_STATS; i++) {
      final int myPss=memInfo.getOtherPss(i);
      final int mySwappablePss=memInfo.getOtherSwappablePss(i);
      final int mySharedDirty=memInfo.getOtherSharedDirty(i);
      final int myPrivateDirty=memInfo.getOtherPrivateDirty(i);
      final int mySharedClean=memInfo.getOtherSharedClean(i);
      final int myPrivateClean=memInfo.getOtherPrivateClean(i);
      if (myPss != 0 || mySharedDirty != 0 || myPrivateDirty != 0 || mySharedClean != 0 || myPrivateClean != 0) {
        printRow(pw,HEAP_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,mySharedDirty,myPrivateDirty,mySharedClean,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
      }
    }
  }
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",viewInstanceCount,"String_Node_Str",viewRootInstanceCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",appContextInstanceCount,"String_Node_Str",activityInstanceCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",globalAssetCount,"String_Node_Str",globalAssetManagerCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",binderLocalObjectCount,"String_Node_Str",binderProxyObjectCount);
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",binderDeathObjectCount);
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",openSslSocketCount);
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",stats.memoryUsed / 1024);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",stats.pageCacheOverflow / 1024,"String_Node_Str",stats.largestMemAlloc / 1024);
  pw.println("String_Node_Str");
  int N=stats.dbStats.size();
  if (N > 0) {
    pw.println("String_Node_Str");
    printRow(pw,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    for (int i=0; i < N; i++) {
      DbStats dbStats=stats.dbStats.get(i);
      printRow(pw,DB_INFO_FORMAT,(dbStats.pageSize > 0) ? String.valueOf(dbStats.pageSize) : "String_Node_Str",(dbStats.dbSize > 0) ? String.valueOf(dbStats.dbSize) : "String_Node_Str",(dbStats.lookaside > 0) ? String.valueOf(dbStats.lookaside) : "String_Node_Str",dbStats.cache,dbStats.dbName);
    }
  }
  String assetAlloc=AssetManager.getAssetAllocations();
  if (assetAlloc != null) {
    pw.println("String_Node_Str");
    pw.println("String_Node_Str");
    pw.print(assetAlloc);
  }
}

Fixed version (ground truth):
private void dumpMemInfo(PrintWriter pw,Debug.MemoryInfo memInfo,boolean checkin,boolean dumpFullInfo,boolean dumpDalvik){
  long nativeMax=Debug.getNativeHeapSize() / 1024;
  long nativeAllocated=Debug.getNativeHeapAllocatedSize() / 1024;
  long nativeFree=Debug.getNativeHeapFreeSize() / 1024;
  Runtime runtime=Runtime.getRuntime();
  long dalvikMax=runtime.totalMemory() / 1024;
  long dalvikFree=runtime.freeMemory() / 1024;
  long dalvikAllocated=dalvikMax - dalvikFree;
  long viewInstanceCount=ViewDebug.getViewInstanceCount();
  long viewRootInstanceCount=ViewDebug.getViewRootImplCount();
  long appContextInstanceCount=Debug.countInstancesOfClass(ContextImpl.class);
  long activityInstanceCount=Debug.countInstancesOfClass(Activity.class);
  int globalAssetCount=AssetManager.getGlobalAssetCount();
  int globalAssetManagerCount=AssetManager.getGlobalAssetManagerCount();
  int binderLocalObjectCount=Debug.getBinderLocalObjectCount();
  int binderProxyObjectCount=Debug.getBinderProxyObjectCount();
  int binderDeathObjectCount=Debug.getBinderDeathObjectCount();
  long openSslSocketCount=Debug.countInstancesOfClass(OpenSSLSocketImpl.class);
  SQLiteDebug.PagerStats stats=SQLiteDebug.getDatabaseInfo();
  if (checkin) {
    String processName=(mBoundApplication != null) ? mBoundApplication.processName : "String_Node_Str";
    pw.print(ACTIVITY_THREAD_CHECKIN_VERSION);
    pw.print(',');
    pw.print(Process.myPid());
    pw.print(',');
    pw.print(processName);
    pw.print(',');
    pw.print(nativeMax);
    pw.print(',');
    pw.print(dalvikMax);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeMax + dalvikMax);
    pw.print(',');
    pw.print(nativeAllocated);
    pw.print(',');
    pw.print(dalvikAllocated);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeAllocated + dalvikAllocated);
    pw.print(',');
    pw.print(nativeFree);
    pw.print(',');
    pw.print(dalvikFree);
    pw.print(',');
    pw.print("String_Node_Str");
    pw.print(nativeFree + dalvikFree);
    pw.print(',');
    pw.print(memInfo.nativePss);
    pw.print(',');
    pw.print(memInfo.dalvikPss);
    pw.print(',');
    pw.print(memInfo.otherPss);
    pw.print(',');
    pw.print(memInfo.getTotalPss());
    pw.print(',');
    pw.print(memInfo.nativeSwappablePss);
    pw.print(',');
    pw.print(memInfo.dalvikSwappablePss);
    pw.print(',');
    pw.print(memInfo.otherSwappablePss);
    pw.print(',');
    pw.print(memInfo.getTotalSwappablePss());
    pw.print(',');
    pw.print(memInfo.nativeSharedDirty);
    pw.print(',');
    pw.print(memInfo.dalvikSharedDirty);
    pw.print(',');
    pw.print(memInfo.otherSharedDirty);
    pw.print(',');
    pw.print(memInfo.getTotalSharedDirty());
    pw.print(',');
    pw.print(memInfo.nativeSharedClean);
    pw.print(',');
    pw.print(memInfo.dalvikSharedClean);
    pw.print(',');
    pw.print(memInfo.otherSharedClean);
    pw.print(',');
    pw.print(memInfo.getTotalSharedClean());
    pw.print(',');
    pw.print(memInfo.nativePrivateDirty);
    pw.print(',');
    pw.print(memInfo.dalvikPrivateDirty);
    pw.print(',');
    pw.print(memInfo.otherPrivateDirty);
    pw.print(',');
    pw.print(memInfo.getTotalPrivateDirty());
    pw.print(',');
    pw.print(memInfo.nativePrivateClean);
    pw.print(',');
    pw.print(memInfo.dalvikPrivateClean);
    pw.print(',');
    pw.print(memInfo.otherPrivateClean);
    pw.print(',');
    pw.print(memInfo.getTotalPrivateClean());
    pw.print(',');
    for (int i=0; i < Debug.MemoryInfo.NUM_OTHER_STATS; i++) {
      pw.print(Debug.MemoryInfo.getOtherLabel(i));
      pw.print(',');
      pw.print(memInfo.getOtherPss(i));
      pw.print(',');
      pw.print(memInfo.getOtherSwappablePss(i));
      pw.print(',');
      pw.print(memInfo.getOtherSharedDirty(i));
      pw.print(',');
      pw.print(memInfo.getOtherSharedClean(i));
      pw.print(',');
      pw.print(memInfo.getOtherPrivateDirty(i));
      pw.print(',');
      pw.print(memInfo.getOtherPrivateClean(i));
      pw.print(',');
    }
    pw.print(viewInstanceCount);
    pw.print(',');
    pw.print(viewRootInstanceCount);
    pw.print(',');
    pw.print(appContextInstanceCount);
    pw.print(',');
    pw.print(activityInstanceCount);
    pw.print(',');
    pw.print(globalAssetCount);
    pw.print(',');
    pw.print(globalAssetManagerCount);
    pw.print(',');
    pw.print(binderLocalObjectCount);
    pw.print(',');
    pw.print(binderProxyObjectCount);
    pw.print(',');
    pw.print(binderDeathObjectCount);
    pw.print(',');
    pw.print(openSslSocketCount);
    pw.print(',');
    pw.print(stats.memoryUsed / 1024);
    pw.print(',');
    pw.print(stats.memoryUsed / 1024);
    pw.print(',');
    pw.print(stats.pageCacheOverflow / 1024);
    pw.print(',');
    pw.print(stats.largestMemAlloc / 1024);
    for (int i=0; i < stats.dbStats.size(); i++) {
      DbStats dbStats=stats.dbStats.get(i);
      pw.print(',');
      pw.print(dbStats.dbName);
      pw.print(',');
      pw.print(dbStats.pageSize);
      pw.print(',');
      pw.print(dbStats.dbSize);
      pw.print(',');
      pw.print(dbStats.lookaside);
      pw.print(',');
      pw.print(dbStats.cache);
      pw.print(',');
      pw.print(dbStats.cache);
    }
    pw.println();
    return;
  }
  if (dumpFullInfo) {
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str",memInfo.nativePss,memInfo.nativeSwappablePss,memInfo.nativeSharedDirty,memInfo.nativePrivateDirty,memInfo.nativeSharedClean,memInfo.nativePrivateClean,nativeMax,nativeAllocated,nativeFree);
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str",memInfo.dalvikPss,memInfo.dalvikSwappablePss,memInfo.dalvikSharedDirty,memInfo.dalvikPrivateDirty,memInfo.dalvikSharedClean,memInfo.dalvikPrivateClean,dalvikMax,dalvikAllocated,dalvikFree);
  }
 else {
    printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_COLUMN,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.nativePss,memInfo.nativeSwappablePss,memInfo.nativePrivateDirty,memInfo.nativePrivateClean,nativeMax,nativeAllocated,nativeFree);
    printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.dalvikPss,memInfo.dalvikSwappablePss,memInfo.dalvikPrivateDirty,memInfo.dalvikPrivateClean,dalvikMax,dalvikAllocated,dalvikFree);
  }
  int otherPss=memInfo.otherPss;
  int otherSwappablePss=memInfo.otherSwappablePss;
  int otherSharedDirty=memInfo.otherSharedDirty;
  int otherPrivateDirty=memInfo.otherPrivateDirty;
  int otherSharedClean=memInfo.otherSharedClean;
  int otherPrivateClean=memInfo.otherPrivateClean;
  for (int i=0; i < Debug.MemoryInfo.NUM_OTHER_STATS; i++) {
    final int myPss=memInfo.getOtherPss(i);
    final int mySwappablePss=memInfo.getOtherSwappablePss(i);
    final int mySharedDirty=memInfo.getOtherSharedDirty(i);
    final int myPrivateDirty=memInfo.getOtherPrivateDirty(i);
    final int mySharedClean=memInfo.getOtherSharedClean(i);
    final int myPrivateClean=memInfo.getOtherPrivateClean(i);
    if (myPss != 0 || mySharedDirty != 0 || myPrivateDirty != 0 || mySharedClean != 0 || myPrivateClean != 0) {
      if (dumpFullInfo) {
        printRow(pw,HEAP_FULL_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,mySharedDirty,myPrivateDirty,mySharedClean,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
      }
 else {
        printRow(pw,HEAP_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,myPrivateDirty,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
      }
      otherPss-=myPss;
      otherSwappablePss-=mySwappablePss;
      otherSharedDirty-=mySharedDirty;
      otherPrivateDirty-=myPrivateDirty;
      otherSharedClean-=mySharedClean;
      otherPrivateClean-=myPrivateClean;
    }
  }
  if (dumpFullInfo) {
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str",otherPss,otherSwappablePss,otherSharedDirty,otherPrivateDirty,otherSharedClean,otherPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_FULL_COLUMN,"String_Node_Str",memInfo.getTotalPss(),memInfo.getTotalSwappablePss(),memInfo.getTotalSharedDirty(),memInfo.getTotalPrivateDirty(),memInfo.getTotalSharedClean(),memInfo.getTotalPrivateClean(),nativeMax + dalvikMax,nativeAllocated + dalvikAllocated,nativeFree + dalvikFree);
  }
 else {
    printRow(pw,HEAP_COLUMN,"String_Node_Str",otherPss,otherSwappablePss,otherPrivateDirty,otherPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
    printRow(pw,HEAP_COLUMN,"String_Node_Str",memInfo.getTotalPss(),memInfo.getTotalSwappablePss(),memInfo.getTotalPrivateDirty(),memInfo.getTotalPrivateClean(),nativeMax + dalvikMax,nativeAllocated + dalvikAllocated,nativeFree + dalvikFree);
  }
  if (dumpDalvik) {
    pw.println("String_Node_Str");
    pw.println("String_Node_Str");
    for (int i=Debug.MemoryInfo.NUM_OTHER_STATS; i < Debug.MemoryInfo.NUM_OTHER_STATS + Debug.MemoryInfo.NUM_DVK_STATS; i++) {
      final int myPss=memInfo.getOtherPss(i);
      final int mySwappablePss=memInfo.getOtherSwappablePss(i);
      final int mySharedDirty=memInfo.getOtherSharedDirty(i);
      final int myPrivateDirty=memInfo.getOtherPrivateDirty(i);
      final int mySharedClean=memInfo.getOtherSharedClean(i);
      final int myPrivateClean=memInfo.getOtherPrivateClean(i);
      if (myPss != 0 || mySharedDirty != 0 || myPrivateDirty != 0 || mySharedClean != 0 || myPrivateClean != 0) {
        if (dumpFullInfo) {
          printRow(pw,HEAP_FULL_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,mySharedDirty,myPrivateDirty,mySharedClean,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
        }
 else {
          printRow(pw,HEAP_COLUMN,Debug.MemoryInfo.getOtherLabel(i),myPss,mySwappablePss,myPrivateDirty,myPrivateClean,"String_Node_Str","String_Node_Str","String_Node_Str");
        }
      }
    }
  }
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",viewInstanceCount,"String_Node_Str",viewRootInstanceCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",appContextInstanceCount,"String_Node_Str",activityInstanceCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",globalAssetCount,"String_Node_Str",globalAssetManagerCount);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",binderLocalObjectCount,"String_Node_Str",binderProxyObjectCount);
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",binderDeathObjectCount);
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",openSslSocketCount);
  pw.println("String_Node_Str");
  pw.println("String_Node_Str");
  printRow(pw,ONE_COUNT_COLUMN,"String_Node_Str",stats.memoryUsed / 1024);
  printRow(pw,TWO_COUNT_COLUMNS,"String_Node_Str",stats.pageCacheOverflow / 1024,"String_Node_Str",stats.largestMemAlloc / 1024);
  pw.println("String_Node_Str");
  int N=stats.dbStats.size();
  if (N > 0) {
    pw.println("String_Node_Str");
    printRow(pw,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    for (int i=0; i < N; i++) {
      DbStats dbStats=stats.dbStats.get(i);
      printRow(pw,DB_INFO_FORMAT,(dbStats.pageSize > 0) ? String.valueOf(dbStats.pageSize) : "String_Node_Str",(dbStats.dbSize > 0) ? String.valueOf(dbStats.dbSize) : "String_Node_Str",(dbStats.lookaside > 0) ? String.valueOf(dbStats.lookaside) : "String_Node_Str",dbStats.cache,dbStats.dbName);
    }
  }
  String assetAlloc=AssetManager.getAssetAllocations();
  if (assetAlloc != null) {
    pw.println("String_Node_Str");
    pw.println("String_Node_Str");
    pw.print(assetAlloc);
  }
}