diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-01-10 11:09:06 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-01-10 11:24:47 -0800 |
commit | db7f37d57b6ac83abe6815d0cd5c50701b6be821 (patch) | |
tree | 842c409305d1c5a2b48171889ecd5f7284822f3b /runtime/gc/accounting/space_bitmap.h | |
parent | 9a612c6b38c158a199b3cbe469286090b72767ca (diff) | |
download | art-db7f37d57b6ac83abe6815d0cd5c50701b6be821.zip art-db7f37d57b6ac83abe6815d0cd5c50701b6be821.tar.gz art-db7f37d57b6ac83abe6815d0cd5c50701b6be821.tar.bz2 |
Refactor large object sweeping.
Moved basic sweeping logic into large_object_space.cc.
Renamed SpaceSetMap -> ObjectSet.
Change-Id: I938c1f29f69b0682350347da2bd5de021c0e0224
Diffstat (limited to 'runtime/gc/accounting/space_bitmap.h')
-rw-r--r-- | runtime/gc/accounting/space_bitmap.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h index 21709ad..2d6cde5 100644 --- a/runtime/gc/accounting/space_bitmap.h +++ b/runtime/gc/accounting/space_bitmap.h @@ -208,7 +208,7 @@ class SpaceBitmap { }; // Like a bitmap except it keeps track of objects using sets. -class SpaceSetMap { +class ObjectSet { public: typedef std::set< const mirror::Object*, std::less<const mirror::Object*>, @@ -237,14 +237,21 @@ class SpaceSetMap { return contained_.find(obj) != contained_.end(); } - std::string GetName() const; - void SetName(const std::string& name); + const std::string& GetName() const { + return name_; + } + + void SetName(const std::string& name) { + name_ = name; + } + + void CopyFrom(const ObjectSet& space_set) { + contained_ = space_set.contained_; + } void Walk(SpaceBitmap::Callback* callback, void* arg) SHARED_LOCKS_REQUIRED(GlobalSynchronization::heap_bitmap_lock_); - void CopyFrom(const SpaceSetMap& space_set); - template <typename Visitor> void Visit(const Visitor& visitor) NO_THREAD_SAFETY_ANALYSIS { for (const mirror::Object* obj : contained_) { @@ -252,8 +259,8 @@ class SpaceSetMap { } } - explicit SpaceSetMap(const std::string& name) : name_(name) {} - ~SpaceSetMap() {} + explicit ObjectSet(const std::string& name) : name_(name) {} + ~ObjectSet() {} Objects& GetObjects() { return contained_; |