summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/dlmalloc.cc
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2013-07-18 00:19:45 -0700
committer Brian Carlstrom <bdc@google.com> 2013-07-18 11:57:02 -0700
commit3e3d591f781b771de89f3b989830da2b6ac6fac8 (patch)
tree9fc07d9785dd6e008f902ce1a5901df861d59b70 /runtime/gc/allocator/dlmalloc.cc
parentdf62950e7a32031b82360c407d46a37b94188fbb (diff)
Fix cpplint build/namespaces issues
Change-Id: I19c68703270c1482d6c6aad8cdf97d3d2924360a
Diffstat (limited to 'runtime/gc/allocator/dlmalloc.cc')
-rw-r--r--runtime/gc/allocator/dlmalloc.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/gc/allocator/dlmalloc.cc b/runtime/gc/allocator/dlmalloc.cc
index 772521596a..3cc64e9da5 100644
--- a/runtime/gc/allocator/dlmalloc.cc
+++ b/runtime/gc/allocator/dlmalloc.cc
@@ -50,17 +50,16 @@ static void art_heap_usage_error(const char* function, void* p) {
#include "utils.h"
#include <sys/mman.h>
-using namespace art;
extern "C" void DlmallocMadviseCallback(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));
+ start = reinterpret_cast<void*>(art::RoundUp(reinterpret_cast<uintptr_t>(start), art::kPageSize));
+ end = reinterpret_cast<void*>(art::RoundDown(reinterpret_cast<uintptr_t>(end), art::kPageSize));
if (end > start) {
- size_t length = reinterpret_cast<byte*>(end) - reinterpret_cast<byte*>(start);
+ size_t length = reinterpret_cast<uint8_t*>(end) - reinterpret_cast<uint8_t*>(start);
int rc = madvise(start, length, MADV_DONTNEED);
if (UNLIKELY(rc != 0)) {
errno = rc;