Fix running with DlMalloc instead of RosAlloc.
Bug: 13748830
Bug: 13744490
Change-Id: Ieec97cf58ebf9864a40ee85aae582cdcf3f27c0c
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 1a32a9a..1bfe9bf 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -21,7 +21,6 @@
#include <limits>
#include <vector>
-#include <valgrind.h>
#include "base/histogram-inl.h"
#include "base/stl_util.h"
@@ -150,7 +149,7 @@
total_allocation_time_(0),
verify_object_mode_(kVerifyObjectModeDisabled),
disable_moving_gc_count_(0),
- running_on_valgrind_(RUNNING_ON_VALGRIND > 0),
+ running_on_valgrind_(Runtime::Current()->RunningOnValgrind()),
use_tlab_(use_tlab) {
if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
LOG(INFO) << "Heap() entering";