Lines Matching refs:rosalloc
54 size_t ByteSize(RosAlloc* rosalloc) const REQUIRES(rosalloc->lock_) { in ByteSize() argument
56 size_t pm_idx = rosalloc->ToPageMapIndex(fpr_base); in ByteSize()
57 size_t byte_size = rosalloc->free_page_run_size_map_[pm_idx]; in ByteSize()
62 void SetByteSize(RosAlloc* rosalloc, size_t byte_size) in SetByteSize() argument
63 REQUIRES(rosalloc->lock_) { in SetByteSize()
66 size_t pm_idx = rosalloc->ToPageMapIndex(fpr_base); in SetByteSize()
67 rosalloc->free_page_run_size_map_[pm_idx] = byte_size; in SetByteSize()
72 void* End(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) { in End() argument
74 uint8_t* end = fpr_base + ByteSize(rosalloc); in End()
77 bool IsLargerThanPageReleaseThreshold(RosAlloc* rosalloc) in IsLargerThanPageReleaseThreshold() argument
78 REQUIRES(rosalloc->lock_) { in IsLargerThanPageReleaseThreshold()
79 return ByteSize(rosalloc) >= rosalloc->page_release_size_threshold_; in IsLargerThanPageReleaseThreshold()
81 bool IsAtEndOfSpace(RosAlloc* rosalloc) in IsAtEndOfSpace() argument
82 REQUIRES(rosalloc->lock_) { in IsAtEndOfSpace()
83 …return reinterpret_cast<uint8_t*>(this) + ByteSize(rosalloc) == rosalloc->base_ + rosalloc->footpr… in IsAtEndOfSpace()
85 bool ShouldReleasePages(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) { in ShouldReleasePages() argument
86 switch (rosalloc->page_release_mode_) { in ShouldReleasePages()
90 return IsAtEndOfSpace(rosalloc); in ShouldReleasePages()
92 return IsLargerThanPageReleaseThreshold(rosalloc); in ShouldReleasePages()
94 return IsLargerThanPageReleaseThreshold(rosalloc) && IsAtEndOfSpace(rosalloc); in ShouldReleasePages()
102 void ReleasePages(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) { in ReleasePages() argument
104 size_t byte_size = ByteSize(rosalloc); in ReleasePages()
106 if (ShouldReleasePages(rosalloc)) { in ReleasePages()
107 rosalloc->ReleasePageRange(start, start + byte_size); in ReleasePages()
455 void Verify(Thread* self, RosAlloc* rosalloc, bool running_on_memory_tool)
943 void* ArtRosAllocMoreCore(allocator::RosAlloc* rosalloc, intptr_t increment);