OSDN Git Service

am bd561cbf: am a9dd9337: Merge "Trim pre-Zygote fork, fix under-estimate of heap...
authorIan Rogers <irogers@google.com>
Fri, 24 Aug 2012 14:29:48 +0000 (07:29 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 24 Aug 2012 14:29:48 +0000 (07:29 -0700)
* commit 'bd561cbffebbff1a8b17e031841ab2fcd2777cff':
  Trim pre-Zygote fork, fix under-estimate of heap limit.

1  2 
vm/alloc/HeapSource.cpp
vm/alloc/HeapSource.h

@@@ -677,10 -728,11 +699,11 @@@ size_t dvmHeapSourceGetValue(HeapSource
  
          switch (spec) {
          case HS_FOOTPRINT:
-             value = mspace_footprint(heap->msp);
+             value = heap->brk - heap->base;
+             assert(value == mspace_footprint(heap->msp));
              break;
          case HS_ALLOWED_FOOTPRINT:
 -            value = mspace_footprint_limit(heap->msp);
 +            value = mspace_max_allowed_footprint(heap->msp);
              break;
          case HS_BYTES_ALLOCATED:
              value = heap->bytesAllocated;
Simple merge