Home | History | Annotate | Download | only in allocator

Lines Matching full:rosalloc

45 class RosAlloc {
55 size_t ByteSize(RosAlloc* rosalloc) const REQUIRES(rosalloc->lock_) {
57 size_t pm_idx = rosalloc->ToPageMapIndex(fpr_base);
58 size_t byte_size = rosalloc->free_page_run_size_map_[pm_idx];
63 void SetByteSize(RosAlloc* rosalloc, size_t byte_size)
64 REQUIRES(rosalloc->lock_) {
67 size_t pm_idx = rosalloc->ToPageMapIndex(fpr_base);
68 rosalloc->free_page_run_size_map_[pm_idx] = byte_size;
73 void* End(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) {
75 uint8_t* end = fpr_base + ByteSize(rosalloc);
78 bool IsLargerThanPageReleaseThreshold(RosAlloc* rosalloc)
79 REQUIRES(rosalloc->lock_) {
80 return ByteSize(rosalloc) >= rosalloc->page_release_size_threshold_;
82 bool IsAtEndOfSpace(RosAlloc* rosalloc)
83 REQUIRES(rosalloc->lock_) {
84 return reinterpret_cast<uint8_t*>(this) + ByteSize(rosalloc) == rosalloc->base_ + rosalloc->footprint_;
86 bool ShouldReleasePages(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) {
87 switch (rosalloc->page_release_mode_) {
91 return IsAtEndOfSpace(rosalloc);
93 return IsLargerThanPageReleaseThreshold(rosalloc);
95 return IsLargerThanPageReleaseThreshold(rosalloc) && IsAtEndOfSpace(rosalloc);
103 void ReleasePages(RosAlloc* rosalloc) REQUIRES(rosalloc->lock_) {
105 size_t byte_size = ByteSize(rosalloc);
107 if (ShouldReleasePages(rosalloc)) {
108 rosalloc->ReleasePageRange(start, start + byte_size);
135 friend class RosAlloc;
308 friend class RosAlloc;
456 void Verify(Thread* self, RosAlloc* rosalloc, bool running_on_memory_tool)
637 size_t operator()(const RosAlloc::Run* r) const {
643 bool operator()(const RosAlloc::Run* r1, const RosAlloc::Run* r2) const {
828 RosAlloc(void* base, size_t capacity, size_t max_capacity,
832 ~RosAlloc();
867 // bytes_allocated_bulk out param returned by RosAlloc::Alloc().
939 friend std::ostream& operator<<(std::ostream& os, const RosAlloc::PageMapKind& rhs);
941 DISALLOW_COPY_AND_ASSIGN(RosAlloc);
943 std::ostream& operator<<(std::ostream& os, const RosAlloc::PageMapKind& rhs);
945 // Callback from rosalloc when it needs to increase the footprint. Must be implemented somewhere
947 void* ArtRosAllocMoreCore(allocator::RosAlloc* rosalloc, intptr_t increment);