Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
dart::Page Class Reference

#include <page.h>

Public Types

enum  PageFlags : uword {
  kExecutable = 1 << 0 , kLarge = 1 << 1 , kImage = 1 << 2 , kVMIsolate = 1 << 3 ,
  kNew = 1 << 4 , kEvacuationCandidate = 1 << 5 , kNeverEvacuate = 1 << 6
}
 

Public Member Functions

bool is_executable () const
 
bool is_large () const
 
bool is_image () const
 
bool is_vm_isolate () const
 
bool is_new () const
 
bool is_old () const
 
bool is_evacuation_candidate () const
 
void set_evacuation_candidate (bool value)
 
bool is_never_evacuate () const
 
void set_never_evacuate (bool value)
 
Pagenext () const
 
void set_next (Page *next)
 
uword start () const
 
uword end () const
 
bool Contains (uword addr) const
 
uword object_start () const
 
uword old_object_start () const
 
uword new_object_start () const
 
uword object_end () const
 
intptr_t used () const
 
intptr_t live_bytes () const
 
void set_live_bytes (intptr_t value)
 
void add_live_bytes (intptr_t value)
 
void sub_live_bytes (intptr_t value)
 
ForwardingPageforwarding_page () const
 
void RegisterUnwindingRecords ()
 
void UnregisterUnwindingRecords ()
 
void AllocateForwardingPage ()
 
void VisitObjects (ObjectVisitor *visitor) const
 
void VisitObjectsUnsafe (ObjectVisitor *visitor) const
 
void VisitObjectPointers (ObjectPointerVisitor *visitor) const
 
void WriteProtect (bool read_only)
 
uword original_top () const
 
uword original_end () const
 
intptr_t card_table_size () const
 
void RememberCard (ObjectPtr const *slot)
 
bool IsCardRemembered (ObjectPtr const *slot)
 
void VisitRememberedCards (PredicateObjectPointerVisitor *visitor, bool only_marked=false)
 
void ResetProgressBar ()
 
Threadowner () const
 
void RecordSurvivors ()
 
void EarlyTenure ()
 
uword promo_candidate_words () const
 
void Acquire (Thread *thread)
 
intptr_t Release (Thread *thread)
 
void Release ()
 
uword TryAllocateGC (intptr_t size)
 
void Unallocate (uword addr, intptr_t size)
 
bool IsSurvivor (uword raw_addr) const
 
bool IsResolved () const
 

Static Public Member Functions

static void Init ()
 
static void ClearCache ()
 
static intptr_t CachedSize ()
 
static void Cleanup ()
 
static constexpr intptr_t OldObjectStartOffset ()
 
static constexpr intptr_t NewObjectStartOffset ()
 
static intptr_t original_top_offset ()
 
static intptr_t original_end_offset ()
 
static PageOf (ObjectPtr obj)
 
static PageOf (uword addr)
 
static PageOf (void *addr)
 
static intptr_t card_table_offset ()
 

Static Public Attributes

static constexpr intptr_t kSlotsPerCardLog2 = 5
 
static constexpr intptr_t kSlotsPerCard = 1 << kSlotsPerCardLog2
 
static constexpr intptr_t kBytesPerCardLog2
 

Friends

class CheckStoreBufferScavengeVisitor
 
class CheckStoreBufferEvacuateVisitor
 
class GCCompactor
 
class PageSpace
 
template<bool >
class ScavengerVisitorBase
 
class SemiSpace
 
class UnwindingRecords
 

Detailed Description

Definition at line 61 of file page.h.

Member Enumeration Documentation

◆ PageFlags

Enumerator
kExecutable 
kLarge 
kImage 
kVMIsolate 
kNew 
kEvacuationCandidate 
kNeverEvacuate 

Definition at line 68 of file page.h.

68 : uword {
69 kExecutable = 1 << 0,
70 kLarge = 1 << 1,
71 kImage = 1 << 2,
72 kVMIsolate = 1 << 3,
73 kNew = 1 << 4,
74 kEvacuationCandidate = 1 << 5,
75 kNeverEvacuate = 1 << 6,
76 };
@ kNew
Definition: page.h:73
@ kLarge
Definition: page.h:70
@ kVMIsolate
Definition: page.h:72
@ kExecutable
Definition: page.h:69
@ kEvacuationCandidate
Definition: page.h:74
@ kImage
Definition: page.h:71
@ kNeverEvacuate
Definition: page.h:75
uintptr_t uword
Definition: globals.h:501

Member Function Documentation

◆ Acquire()

void dart::Page::Acquire ( Thread thread)
inline

Definition at line 216 of file page.h.

216 {
217 ASSERT(owner_ == nullptr);
218 owner_ = thread;
219 ASSERT(thread->top() == 0);
220 ASSERT(thread->end() == 0);
221 thread->set_top(top_);
222 thread->set_end(end_);
223 thread->set_true_end(end_);
224 }
#define ASSERT(E)

◆ add_live_bytes()

void dart::Page::add_live_bytes ( intptr_t  value)
inline

Definition at line 126 of file page.h.

126{ live_bytes_ += value; }
uint8_t value

◆ AllocateForwardingPage()

void dart::Page::AllocateForwardingPage ( )

Definition at line 112 of file compactor.cc.

112 {
113 ASSERT(forwarding_page_ == nullptr);
114 ASSERT((object_start() + sizeof(ForwardingPage)) < object_end());
115 ASSERT(Utils::IsAligned(sizeof(ForwardingPage), kObjectAlignment));
116 top_ -= sizeof(ForwardingPage);
117 forwarding_page_ = reinterpret_cast<ForwardingPage*>(top_.load());
118}
uword object_start() const
Definition: page.h:109
uword object_end() const
Definition: page.h:118
T load(std::memory_order order=std::memory_order_relaxed) const
Definition: atomic.h:21
static constexpr bool IsAligned(T x, uintptr_t alignment, uintptr_t offset=0)
Definition: utils.h:92
static constexpr intptr_t kObjectAlignment

◆ CachedSize()

intptr_t dart::Page::CachedSize ( )
static

Definition at line 51 of file page.cc.

51 {
52 MutexLocker ml(page_cache_mutex);
54}
static Mutex * page_cache_mutex
Definition: page.cc:27
static constexpr intptr_t kPageSize
Definition: page.h:27
static intptr_t page_cache_size
Definition: page.cc:29

◆ card_table_offset()

static intptr_t dart::Page::card_table_offset ( )
inlinestatic

Definition at line 183 of file page.h.

183{ return OFFSET_OF(Page, card_table_); }
#define OFFSET_OF(type, field)
Definition: globals.h:138

◆ card_table_size()

intptr_t dart::Page::card_table_size ( ) const
inline

Definition at line 179 of file page.h.

179 {
180 return memory_->size() >> kBytesPerCardLog2;
181 }
static constexpr intptr_t kBytesPerCardLog2
Definition: page.h:176
intptr_t size() const

◆ Cleanup()

void dart::Page::Cleanup ( )
static

Definition at line 45 of file page.cc.

45 {
46 ClearCache();
47 delete page_cache_mutex;
48 page_cache_mutex = nullptr;
49}
static void ClearCache()
Definition: page.cc:36

◆ ClearCache()

void dart::Page::ClearCache ( )
static

Definition at line 36 of file page.cc.

36 {
37 MutexLocker ml(page_cache_mutex);
40 while (page_cache_size > 0) {
42 }
43}
static VirtualMemory * page_cache[kPageCacheCapacity]
Definition: page.cc:28
static constexpr intptr_t kPageCacheCapacity
Definition: page.cc:26

◆ Contains()

bool dart::Page::Contains ( uword  addr) const
inline

Definition at line 107 of file page.h.

107{ return memory_->Contains(addr); }
bool Contains(uword addr) const

◆ EarlyTenure()

void dart::Page::EarlyTenure ( )
inline

Definition at line 210 of file page.h.

210{ survivor_end_ = end_; }

◆ end()

uword dart::Page::end ( ) const
inline

Definition at line 106 of file page.h.

106{ return memory_->end(); }
uword end() const

◆ forwarding_page()

ForwardingPage * dart::Page::forwarding_page ( ) const
inline

Definition at line 129 of file page.h.

129{ return forwarding_page_; }

◆ Init()

void dart::Page::Init ( )
static

Definition at line 31 of file page.cc.

31 {
32 ASSERT(page_cache_mutex == nullptr);
33 page_cache_mutex = new Mutex(NOT_IN_PRODUCT("page_cache_mutex"));
34}
NOT_IN_PRODUCT(LibraryPtr ReloadTestScript(const char *script))

◆ is_evacuation_candidate()

bool dart::Page::is_evacuation_candidate ( ) const
inline

Definition at line 83 of file page.h.

83 {
84 return (flags_ & kEvacuationCandidate) != 0;
85 }

◆ is_executable()

bool dart::Page::is_executable ( ) const
inline

Definition at line 77 of file page.h.

77{ return (flags_ & kExecutable) != 0; }

◆ is_image()

bool dart::Page::is_image ( ) const
inline

Definition at line 79 of file page.h.

79{ return (flags_ & kImage) != 0; }

◆ is_large()

bool dart::Page::is_large ( ) const
inline

Definition at line 78 of file page.h.

78{ return (flags_ & kLarge) != 0; }

◆ is_never_evacuate()

bool dart::Page::is_never_evacuate ( ) const
inline

Definition at line 93 of file page.h.

93{ return (flags_ & kNeverEvacuate) != 0; }

◆ is_new()

bool dart::Page::is_new ( ) const
inline

Definition at line 81 of file page.h.

81{ return (flags_ & kNew) != 0; }

◆ is_old()

bool dart::Page::is_old ( ) const
inline

Definition at line 82 of file page.h.

82{ return !is_new(); }
bool is_new() const
Definition: page.h:81

◆ is_vm_isolate()

bool dart::Page::is_vm_isolate ( ) const
inline

Definition at line 80 of file page.h.

80{ return (flags_ & kVMIsolate) != 0; }

◆ IsCardRemembered()

bool dart::Page::IsCardRemembered ( ObjectPtr const *  slot)
inline

Definition at line 188 of file page.h.

188 {
189 return IsCardRemembered(reinterpret_cast<uword>(slot));
190 }
bool IsCardRemembered(ObjectPtr const *slot)
Definition: page.h:188

◆ IsResolved()

bool dart::Page::IsResolved ( ) const
inline

Definition at line 272 of file page.h.

272{ return top_ == resolved_top_; }

◆ IsSurvivor()

bool dart::Page::IsSurvivor ( uword  raw_addr) const
inline

Definition at line 271 of file page.h.

271{ return raw_addr < survivor_end_; }

◆ live_bytes()

intptr_t dart::Page::live_bytes ( ) const
inline

Definition at line 124 of file page.h.

124{ return live_bytes_; }

◆ new_object_start()

uword dart::Page::new_object_start ( ) const
inline

Definition at line 115 of file page.h.

115 {
116 return memory_->start() + NewObjectStartOffset();
117 }
static constexpr intptr_t NewObjectStartOffset()
Definition: page.h:144
uword start() const

◆ NewObjectStartOffset()

static constexpr intptr_t dart::Page::NewObjectStartOffset ( )
inlinestaticconstexpr

Definition at line 144 of file page.h.

144 {
145 // Note weaker alignment because the bool/null offset tricks don't apply to
146 // new-space.
147 return Utils::RoundUp(sizeof(Page), kObjectAlignment,
149 }
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
Definition: utils.h:120
static constexpr intptr_t kNewObjectAlignmentOffset

◆ next()

Page * dart::Page::next ( ) const
inline

Definition at line 102 of file page.h.

102{ return next_; }

◆ object_end()

uword dart::Page::object_end ( ) const
inline

Definition at line 118 of file page.h.

118 {
119 if (owner_ != nullptr) return owner_->top();
120 return top_;
121 }
uword top() const
Definition: thread.h:709

◆ object_start()

uword dart::Page::object_start ( ) const
inline

Definition at line 109 of file page.h.

109 {
111 }
uword new_object_start() const
Definition: page.h:115
uword old_object_start() const
Definition: page.h:112

◆ Of() [1/3]

static Page * dart::Page::Of ( ObjectPtr  obj)
inlinestatic

Definition at line 162 of file page.h.

162 {
163 ASSERT(obj->IsHeapObject());
164 return reinterpret_cast<Page*>(static_cast<uword>(obj) & kPageMask);
165 }
static constexpr intptr_t kPageMask
Definition: page.h:29

◆ Of() [2/3]

static Page * dart::Page::Of ( uword  addr)
inlinestatic

Definition at line 166 of file page.h.

166 {
167 return reinterpret_cast<Page*>(addr & kPageMask);
168 }

◆ Of() [3/3]

static Page * dart::Page::Of ( void *  addr)
inlinestatic

Definition at line 169 of file page.h.

169 {
170 return reinterpret_cast<Page*>(reinterpret_cast<uword>(addr) & kPageMask);
171 }

◆ old_object_start()

uword dart::Page::old_object_start ( ) const
inline

Definition at line 112 of file page.h.

112 {
113 return memory_->start() + OldObjectStartOffset();
114 }
static constexpr intptr_t OldObjectStartOffset()
Definition: page.h:140

◆ OldObjectStartOffset()

static constexpr intptr_t dart::Page::OldObjectStartOffset ( )
inlinestaticconstexpr

Definition at line 140 of file page.h.

140 {
141 return Utils::RoundUp(sizeof(Page), kObjectStartAlignment,
143 }
static constexpr intptr_t kOldObjectAlignmentOffset
static constexpr intptr_t kObjectStartAlignment

◆ original_end()

uword dart::Page::original_end ( ) const
inline

Definition at line 155 of file page.h.

155{ return end_.load(std::memory_order_relaxed); }

◆ original_end_offset()

static intptr_t dart::Page::original_end_offset ( )
inlinestatic

Definition at line 157 of file page.h.

157{ return OFFSET_OF(Page, end_); }

◆ original_top()

uword dart::Page::original_top ( ) const
inline

Definition at line 154 of file page.h.

154{ return top_.load(std::memory_order_acquire); }

◆ original_top_offset()

static intptr_t dart::Page::original_top_offset ( )
inlinestatic

Definition at line 156 of file page.h.

156{ return OFFSET_OF(Page, top_); }

◆ owner()

Thread * dart::Page::owner ( ) const
inline

Definition at line 203 of file page.h.

203{ return owner_; }

◆ promo_candidate_words()

uword dart::Page::promo_candidate_words ( ) const
inline

Definition at line 212 of file page.h.

212 {
213 return (survivor_end_ - object_start()) / kWordSize;
214 }
constexpr intptr_t kWordSize
Definition: globals.h:509

◆ RecordSurvivors()

void dart::Page::RecordSurvivors ( )
inline

Definition at line 206 of file page.h.

206{ survivor_end_ = object_end(); }

◆ RegisterUnwindingRecords()

void dart::Page::RegisterUnwindingRecords ( )

◆ Release() [1/2]

void dart::Page::Release ( )
inline

Definition at line 240 of file page.h.

240 {
241 if (owner_ != nullptr) {
242 Release(owner_);
243 }
244 }
void Release()
Definition: page.h:240

◆ Release() [2/2]

intptr_t dart::Page::Release ( Thread thread)
inline

Definition at line 225 of file page.h.

225 {
226 ASSERT(owner_ == thread);
227 owner_ = nullptr;
228 uword old_top = top_;
229 uword new_top = thread->top();
230 top_.store(new_top, std::memory_order_release);
231 thread->set_top(0);
232 thread->set_end(0);
233 thread->set_true_end(0);
234#if !defined(PRODUCT) || defined(FORCE_INCLUDE_SAMPLING_HEAP_PROFILER)
235 thread->heap_sampler().HandleReleasedTLAB(Thread::Current());
236#endif
237 ASSERT(new_top >= old_top);
238 return new_top - old_top;
239 }
void store(T arg, std::memory_order order=std::memory_order_relaxed)
Definition: atomic.h:27
static Thread * Current()
Definition: thread.h:362

◆ RememberCard()

void dart::Page::RememberCard ( ObjectPtr const *  slot)
inline

Definition at line 185 of file page.h.

185 {
186 RememberCard(reinterpret_cast<uword>(slot));
187 }
void RememberCard(ObjectPtr const *slot)
Definition: page.h:185

◆ ResetProgressBar()

void dart::Page::ResetProgressBar ( )

Definition at line 277 of file page.cc.

277 {
278 progress_bar_ = 0;
279}

◆ set_evacuation_candidate()

void dart::Page::set_evacuation_candidate ( bool  value)
inline

Definition at line 86 of file page.h.

86 {
87 if (value) {
88 flags_ |= kEvacuationCandidate;
89 } else {
90 flags_ &= ~kEvacuationCandidate;
91 }
92 }

◆ set_live_bytes()

void dart::Page::set_live_bytes ( intptr_t  value)
inline

Definition at line 125 of file page.h.

125{ live_bytes_ = value; }

◆ set_never_evacuate()

void dart::Page::set_never_evacuate ( bool  value)
inline

Definition at line 94 of file page.h.

94 {
95 if (value) {
96 flags_ |= kNeverEvacuate;
97 } else {
98 flags_ &= ~kNeverEvacuate;
99 }
100 }

◆ set_next()

void dart::Page::set_next ( Page next)
inline

Definition at line 103 of file page.h.

103{ next_ = next; }
Page * next() const
Definition: page.h:102

◆ start()

uword dart::Page::start ( ) const
inline

Definition at line 105 of file page.h.

105{ return memory_->start(); }

◆ sub_live_bytes()

void dart::Page::sub_live_bytes ( intptr_t  value)
inline

Definition at line 127 of file page.h.

127{ live_bytes_ -= value; }

◆ TryAllocateGC()

uword dart::Page::TryAllocateGC ( intptr_t  size)
inline

Definition at line 246 of file page.h.

246 {
247 ASSERT(owner_ == nullptr);
248 uword result = top_;
249 uword new_top = result + size;
250 if (LIKELY(new_top <= end_)) {
251 top_ = new_top;
252 return result;
253 }
254 return 0;
255 }
GAsyncResult * result
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
#define LIKELY(cond)
Definition: globals.h:260

◆ Unallocate()

void dart::Page::Unallocate ( uword  addr,
intptr_t  size 
)
inline

Definition at line 257 of file page.h.

257 {
258 ASSERT((addr + size) == top_);
259
260#if defined(DEBUG)
261 uword* cursor = reinterpret_cast<uword*>(addr);
262 uword* end = reinterpret_cast<uword*>(addr + size);
263 while (cursor < end) {
264 *cursor++ = kAllocationCanary;
265 }
266#endif
267
268 top_ -= size;
269 }
uword end() const
Definition: page.h:106
static constexpr intptr_t kAllocationCanary
Definition: globals.h:181

◆ UnregisterUnwindingRecords()

void dart::Page::UnregisterUnwindingRecords ( )

◆ used()

intptr_t dart::Page::used ( ) const
inline

Definition at line 122 of file page.h.

122{ return object_end() - object_start(); }

◆ VisitObjectPointers()

void dart::Page::VisitObjectPointers ( ObjectPointerVisitor visitor) const

Definition at line 198 of file page.cc.

198 {
199 ASSERT(Thread::Current()->OwnsGCSafepoint() ||
200 (Thread::Current()->task_kind() == Thread::kCompactorTask) ||
201 (Thread::Current()->task_kind() == Thread::kMarkerTask));
202 NoSafepointScope no_safepoint;
203 uword obj_addr = object_start();
204 uword end_addr = object_end();
205 while (obj_addr < end_addr) {
206 ObjectPtr raw_obj = UntaggedObject::FromAddr(obj_addr);
207 obj_addr += raw_obj->untag()->VisitPointers(visitor);
208 }
209 ASSERT(obj_addr == end_addr);
210}
@ kMarkerTask
Definition: thread.h:349
@ kCompactorTask
Definition: thread.h:351
static ObjectPtr FromAddr(uword addr)
Definition: raw_object.h:516

◆ VisitObjects()

void dart::Page::VisitObjects ( ObjectVisitor visitor) const

Definition at line 174 of file page.cc.

174 {
175 ASSERT(Thread::Current()->OwnsGCSafepoint() ||
177 NoSafepointScope no_safepoint;
178 uword obj_addr = object_start();
179 uword end_addr = object_end();
180 while (obj_addr < end_addr) {
181 ObjectPtr raw_obj = UntaggedObject::FromAddr(obj_addr);
182 visitor->VisitObject(raw_obj);
183 obj_addr += raw_obj->untag()->HeapSize();
184 }
185 ASSERT(obj_addr == end_addr);
186}
@ kIncrementalCompactorTask
Definition: thread.h:354

◆ VisitObjectsUnsafe()

void dart::Page::VisitObjectsUnsafe ( ObjectVisitor visitor) const

Definition at line 188 of file page.cc.

188 {
189 uword obj_addr = object_start();
190 uword end_addr = object_end();
191 while (obj_addr < end_addr) {
192 ObjectPtr raw_obj = UntaggedObject::FromAddr(obj_addr);
193 visitor->VisitObject(raw_obj);
194 obj_addr += raw_obj->untag()->HeapSize();
195 }
196}

◆ VisitRememberedCards()

void dart::Page::VisitRememberedCards ( PredicateObjectPointerVisitor visitor,
bool  only_marked = false 
)

Definition at line 212 of file page.cc.

213 {
214 ASSERT(Thread::Current()->OwnsGCSafepoint() ||
215 (Thread::Current()->task_kind() == Thread::kScavengerTask) ||
217 NoSafepointScope no_safepoint;
218
219 if (card_table_ == nullptr) {
220 return;
221 }
222
223 ArrayPtr obj =
224 static_cast<ArrayPtr>(UntaggedObject::FromAddr(object_start()));
225 ASSERT(obj->IsArray() || obj->IsImmutableArray());
226 ASSERT(obj->untag()->IsCardRemembered());
227 if (only_marked && !obj->untag()->IsMarked()) return;
228 CompressedObjectPtr* obj_from = obj->untag()->from();
229 CompressedObjectPtr* obj_to =
230 obj->untag()->to(Smi::Value(obj->untag()->length()));
231 uword heap_base = obj.heap_base();
232
233 const size_t size_in_bits = card_table_size();
234 const size_t size_in_words =
236 for (;;) {
237 const size_t word_offset = progress_bar_.fetch_add(1);
238 if (word_offset >= size_in_words) break;
239
240 uword cell = card_table_[word_offset];
241 if (cell == 0) continue;
242
243 for (intptr_t bit_offset = 0; bit_offset < kBitsPerWord; bit_offset++) {
244 const uword bit_mask = static_cast<uword>(1) << bit_offset;
245 if ((cell & bit_mask) == 0) continue;
246 const intptr_t i = (word_offset << kBitsPerWordLog2) + bit_offset;
247
248 CompressedObjectPtr* card_from =
249 reinterpret_cast<CompressedObjectPtr*>(this) +
250 (i << kSlotsPerCardLog2);
251 CompressedObjectPtr* card_to =
252 reinterpret_cast<CompressedObjectPtr*>(card_from) +
253 (1 << kSlotsPerCardLog2) - 1;
254 // Minus 1 because to is inclusive.
255
256 if (card_from < obj_from) {
257 // First card overlaps with header.
258 card_from = obj_from;
259 }
260 if (card_to > obj_to) {
261 // Last card(s) may extend past the object. Array truncation can make
262 // this happen for more than one card.
263 card_to = obj_to;
264 }
265
266 bool has_new_target = visitor->PredicateVisitCompressedPointers(
267 heap_base, card_from, card_to);
268
269 if (!has_new_target) {
270 cell ^= bit_mask;
271 }
272 }
273 card_table_[word_offset] = cell;
274 }
275}
UntaggedObject * untag() const
intptr_t card_table_size() const
Definition: page.h:179
static constexpr intptr_t kSlotsPerCardLog2
Definition: page.h:174
T fetch_add(T arg, std::memory_order order=std::memory_order_relaxed)
Definition: atomic.h:35
intptr_t Value() const
Definition: object.h:9990
@ kScavengerTask
Definition: thread.h:352
constexpr intptr_t kBitsPerWordLog2
Definition: globals.h:513
constexpr intptr_t kBitsPerWord
Definition: globals.h:514
ObjectPtr CompressedObjectPtr

◆ WriteProtect()

void dart::Page::WriteProtect ( bool  read_only)

Definition at line 281 of file page.cc.

281 {
282 ASSERT(!is_image());
283
285 if (read_only) {
286 if (is_executable()) {
288 } else {
290 }
291 } else {
293 }
294 memory_->Protect(prot);
295}
bool is_image() const
Definition: page.h:79
bool is_executable() const
Definition: page.h:77
static void Protect(void *address, intptr_t size, Protection mode)

Friends And Related Function Documentation

◆ CheckStoreBufferEvacuateVisitor

friend class CheckStoreBufferEvacuateVisitor
friend

Definition at line 347 of file page.h.

◆ CheckStoreBufferScavengeVisitor

friend class CheckStoreBufferScavengeVisitor
friend

Definition at line 346 of file page.h.

◆ GCCompactor

friend class GCCompactor
friend

Definition at line 348 of file page.h.

◆ PageSpace

friend class PageSpace
friend

Definition at line 349 of file page.h.

◆ ScavengerVisitorBase

template<bool >
friend class ScavengerVisitorBase
friend

Definition at line 351 of file page.h.

◆ SemiSpace

friend class SemiSpace
friend

Definition at line 352 of file page.h.

◆ UnwindingRecords

friend class UnwindingRecords
friend

Definition at line 353 of file page.h.

Member Data Documentation

◆ kBytesPerCardLog2

constexpr intptr_t dart::Page::kBytesPerCardLog2
staticconstexpr
Initial value:
=
static constexpr intptr_t kCompressedWordSizeLog2
Definition: globals.h:43

Definition at line 176 of file page.h.

◆ kSlotsPerCard

constexpr intptr_t dart::Page::kSlotsPerCard = 1 << kSlotsPerCardLog2
staticconstexpr

Definition at line 175 of file page.h.

◆ kSlotsPerCardLog2

constexpr intptr_t dart::Page::kSlotsPerCardLog2 = 5
staticconstexpr

Definition at line 174 of file page.h.


The documentation for this class was generated from the following files: