diff options
Diffstat (limited to 'runtime/gc/space/space.h')
-rw-r--r-- | runtime/gc/space/space.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h index 860a4c9..d24650b 100644 --- a/runtime/gc/space/space.h +++ b/runtime/gc/space/space.h @@ -50,6 +50,7 @@ class DlMallocSpace; class RosAllocSpace; class ImageSpace; class LargeObjectSpace; +class RegionSpace; class ZygoteSpace; static constexpr bool kDebugSpaces = kIsDebugBuild; @@ -72,6 +73,7 @@ enum SpaceType { kSpaceTypeZygoteSpace, kSpaceTypeBumpPointerSpace, kSpaceTypeLargeObjectSpace, + kSpaceTypeRegionSpace, }; std::ostream& operator<<(std::ostream& os, const SpaceType& space_type); @@ -132,6 +134,11 @@ class Space { } virtual BumpPointerSpace* AsBumpPointerSpace(); + bool IsRegionSpace() const { + return GetType() == kSpaceTypeRegionSpace; + } + virtual RegionSpace* AsRegionSpace(); + // Does this space hold large objects and implement the large object space abstraction? bool IsLargeObjectSpace() const { return GetType() == kSpaceTypeLargeObjectSpace; |