From 700a402244a1a423da4f3ba8032459f4b65fa18f Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 19 May 2014 16:49:03 -0700 Subject: Now we have a proper C++ library, use std::unique_ptr. Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61 --- runtime/gc/allocator/rosalloc.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'runtime/gc/allocator/rosalloc.h') diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h index 9ea4306028..9464331c70 100644 --- a/runtime/gc/allocator/rosalloc.h +++ b/runtime/gc/allocator/rosalloc.h @@ -17,31 +17,21 @@ #ifndef ART_RUNTIME_GC_ALLOCATOR_ROSALLOC_H_ #define ART_RUNTIME_GC_ALLOCATOR_ROSALLOC_H_ -#include #include #include -#include #include +#include +#include +#include +#include #include #include "base/mutex.h" #include "base/logging.h" #include "globals.h" #include "mem_map.h" -#include "UniquePtrCompat.h" #include "utils.h" -// Ensure we have an unordered_set until we have worked out C++ library issues. -#ifdef ART_WITH_STLPORT -#include -template -class unordered_set : public std::hash_set {}; -#else // ART_WITH_STLPORT -// TODO: avoid the use of using in a header file. -#include -using std::unordered_set; -#endif // ART_WITH_STLPORT - namespace art { namespace gc { namespace allocator { @@ -451,7 +441,7 @@ class RosAlloc { std::set non_full_runs_[kNumOfSizeBrackets]; // The run sets that hold the runs whose slots are all full. This is // debug only. full_runs_[i] is guarded by size_bracket_locks_[i]. - unordered_set full_runs_[kNumOfSizeBrackets]; + std::unordered_set full_runs_[kNumOfSizeBrackets]; // The set of free pages. std::set free_page_runs_ GUARDED_BY(lock_); // The dedicated full run, it is always full and shared by all threads when revoking happens. @@ -479,7 +469,7 @@ class RosAlloc { byte* page_map_; // No GUARDED_BY(lock_) for kReadPageMapEntryWithoutLockInBulkFree. size_t page_map_size_; size_t max_page_map_size_; - UniquePtr page_map_mem_map_; + std::unique_ptr page_map_mem_map_; // The table that indicates the size of free page runs. These sizes // are stored here to avoid storing in the free page header and -- cgit v1.2.3