diff options
| author | 2012-08-21 14:20:03 -0700 | |
|---|---|---|
| committer | 2012-08-21 14:20:21 -0700 | |
| commit | b18e77abdb06a443744fbb6589e0932fa89f6073 (patch) | |
| tree | 0e77099cfedbbb13a1fee3c1b93c34305b447d1c /src/space.cc | |
| parent | 22ad71521f3006b9bf344738c0276a501934fc01 (diff) | |
Switch art over to the new bionic dlmalloc 2.8.5 callback
Change-Id: I1314e87a51553fd358dbf9c44f804a7eb2de3a7d
Diffstat (limited to 'src/space.cc')
| -rw-r--r-- | src/space.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/space.cc b/src/space.cc index f0f93231cd..324b495ddc 100644 --- a/src/space.cc +++ b/src/space.cc @@ -319,7 +319,11 @@ size_t AllocSpace::AllocationSize(const Object* obj) { return mspace_usable_size(const_cast<void*>(reinterpret_cast<const void*>(obj))) + kChunkOverhead; } -void MspaceMadviseCallback(void* start, void* end, void* /*arg*/) { +void MspaceMadviseCallback(void* start, void* end, size_t used_bytes, void* /* arg */) { + // Is this chunk in use? + if (used_bytes != 0) { + return; + } // Do we have any whole pages to give back? start = reinterpret_cast<void*>(RoundUp(reinterpret_cast<uintptr_t>(start), kPageSize)); end = reinterpret_cast<void*>(RoundDown(reinterpret_cast<uintptr_t>(end), kPageSize)); @@ -329,14 +333,6 @@ void MspaceMadviseCallback(void* start, void* end, void* /*arg*/) { } } -void MspaceMadviseCallback(void* start, void* end, size_t used_bytes, void* arg) { - // Is this chunk in use? - if (used_bytes != 0) { - return; - } - return MspaceMadviseCallback(start, end, arg); -} - void AllocSpace::Trim() { MutexLock mu(lock_); // Trim to release memory at the end of the space. |