Lines Matching refs:page

50                                                    Page* page)
54 page_range_(page),
63 AllocationSpace owner = page->owner_identity();
68 // We have hit the end of the page and should advance to the next block of
69 // objects. This happens at the end of the page.
81 Page* page = static_cast<Page*>(chunk);
83 MemoryChunkLayout::AllocatableMemoryInMemoryChunk(page->owner_identity()),
84 page->area_size());
86 page->ResetAllocationStatistics();
87 page->SetOldGenerationPageFlags(heap()->incremental_marking()->IsMarking());
88 page->AllocateFreeListCategories();
89 page->InitializeFreeListCategories();
90 page->list_node().Initialize();
91 page->InitializationMemoryFence();
92 return page;
138 // safe because there exists no other competing action on the page links
237 for (const Page* page : *this) {
238 DCHECK(page->SweepingDone());
239 size += page->CommittedPhysicalMemory();
241 // Ensure that the space's counter matches the sum of all page counters.
248 for (const Page* page : *this) {
249 if (page == p) return true;
254 void PagedSpace::RefineAllocatedBytesAfterSweeping(Page* page) {
255 CHECK(page->SweepingDone());
258 // The live_byte on the page was accounted in the space allocated
260 // accurate live byte count on the page.
261 size_t old_counter = marking_state->live_bytes(page);
262 size_t new_counter = page->allocated_bytes();
265 DecreaseAllocatedBytes(old_counter - new_counter, page);
267 marking_state->SetLiveBytes(page, 0);
272 Page* page = free_list()->GetPageForSize(size_in_bytes);
273 if (!page) return nullptr;
274 RemovePage(page);
275 return page;
278 size_t PagedSpace::AddPage(Page* page) {
279 CHECK(page->SweepingDone());
280 page->set_owner(this);
281 memory_chunk_list_.PushBack(page);
282 AccountCommitted(page->size());
283 IncreaseCapacity(page->area_size());
284 IncreaseAllocatedBytes(page->allocated_bytes(), page);
287 IncrementExternalBackingStoreBytes(t, page->ExternalBackingStoreBytes(t));
289 IncrementCommittedPhysicalMemory(page->CommittedPhysicalMemory());
290 return RelinkFreeListCategories(page);
293 void PagedSpace::RemovePage(Page* page) {
294 CHECK(page->SweepingDone());
295 memory_chunk_list_.Remove(page);
296 UnlinkFreeListCategories(page);
297 DecreaseAllocatedBytes(page->allocated_bytes(), page);
298 DecreaseCapacity(page->area_size());
299 AccountUncommitted(page->size());
302 DecrementExternalBackingStoreBytes(t, page->ExternalBackingStoreBytes(t));
304 DecrementCommittedPhysicalMemory(page->CommittedPhysicalMemory());
320 size_t PagedSpace::ShrinkPageToHighWaterMark(Page* page) {
321 size_t unused = page->ShrinkToHighWaterMark();
328 for (Page* page : *this) {
329 free_list_->EvictFreeListItems(page);
339 for (Page* page : *this) {
340 DCHECK(page->IsFlagSet(Page::NEVER_EVACUATE));
341 ShrinkPageToHighWaterMark(page);
346 Page* page = heap()->memory_allocator()->AllocatePage(
348 if (page == nullptr) return nullptr;
350 AddPage(page);
351 Free(page->area_start(), page->area_size(),
353 return page;
358 Page* page = heap()->memory_allocator()->AllocatePage(
360 if (page == nullptr) return {};
362 AddPage(page);
364 heap()->isolate()->AddCodeMemoryChunk(page);
366 Address object_start = page->area_start();
367 CHECK_LE(size_in_bytes, page->area_size());
368 Free(page->area_start() + size_in_bytes, page->area_size() - size_in_bytes,
370 AddRangeToActiveSystemPages(page, object_start, object_start + size_in_bytes);
376 for (const Page* page : *this) {
378 USE(page);
485 // The code page of the linear allocation area needs to be unprotected
500 void PagedSpace::ReleasePage(Page* page) {
503 page));
504 DCHECK_EQ(page->owner(), this);
506 free_list_->EvictFreeListItems(page);
508 if (Page::FromAllocationAreaAddress(allocation_info_->top()) == page) {
513 heap()->isolate()->RemoveCodeMemoryChunk(page);
516 AccountUncommitted(page->size());
517 DecrementCommittedPhysicalMemory(page->CommittedPhysicalMemory());
518 accounting_stats_.DecreaseCapacity(page->area_size());
520 page);
525 for (Page* page : *this) {
526 DCHECK(heap()->memory_allocator()->IsMemoryChunkExecutable(page));
527 page->SetReadable();
533 for (Page* page : *this) {
534 DCHECK(heap()->memory_allocator()->IsMemoryChunkExecutable(page));
535 page->SetReadAndExecutable();
541 for (Page* page : *this) {
542 DCHECK(heap()->memory_allocator()->IsMemoryChunkExecutable(page));
543 page->SetCodeModificationPermissions();
577 // Verify that it did not turn the page of the new node into an evacuation
583 Page* page = Page::FromHeapObject(new_node);
584 IncreaseAllocatedBytes(new_node_size, page);
595 page, GetUnprotectMemoryOrigin(is_compaction_space()));
600 AddRangeToActiveSystemPages(page, start, limit);
692 // Verify that it did not turn the page of the new node into an evacuation
698 Page* page = Page::FromHeapObject(new_node);
699 IncreaseAllocatedBytes(new_node_size, page);
713 page, UnprotectMemoryOrigin::kMaybeOffMainThread);
717 AddRangeToActiveSystemPages(page, start, limit);
744 for (Page* page : *this) {
745 CHECK_EQ(page->owner(), this);
751 if (page == Page::FromAllocationAreaAddress(allocation_info_->top())) {
754 CHECK(page->SweepingDone());
755 PagedSpaceObjectIterator it(isolate->heap(), this, page);
756 Address end_of_previous_object = page->area_start();
757 Address top = page->area_end();
794 CHECK_EQ(external_page_bytes[t], page->ExternalBackingStoreBytes(t));
798 CHECK(!page->IsFlagSet(Page::PAGE_NEW_OLD_PROMOTION));
799 CHECK(!page->IsFlagSet(Page::PAGE_NEW_NEW_PROMOTION));
823 for (Page* page : *this) {
824 CHECK(page->SweepingDone());
825 PagedSpaceObjectIterator it(heap(), this, page);
833 CHECK_LE(black_size, marking_state->live_bytes(page));
843 for (Page* page : *this) {
844 DCHECK(page->SweepingDone());
845 total_capacity += page->area_size();
846 PagedSpaceObjectIterator it(heap, this, page);
853 total_allocated += page->allocated_bytes();
856 DCHECK_LE(real_allocated, accounting_stats_.AllocatedOnPage(page));
857 DCHECK_EQ(page->allocated_bytes(), accounting_stats_.AllocatedOnPage(page));
873 for (Page* page : *this) {
875 page->SweepingDone()
876 ? page->allocated_bytes()
877 : static_cast<size_t>(marking_state->live_bytes(page));
878 total_capacity += page->area_size();
880 DCHECK_EQ(page_allocated, accounting_stats_.AllocatedOnPage(page));
913 Page* page = PagedSpace::Expand();
914 new_pages_.push_back(page);
915 return page;
924 Page* page = Expand();
925 if (!page) return false;
927 heap()->NotifyOldGenerationExpansion(identity(), page);
963 Page* page = main_space->RemovePageSafe(size_in_bytes);
964 if (page != nullptr) {
965 AddPage(page);
1011 void PagedSpace::AddRangeToActiveSystemPages(Page* page, Address start,
1013 DCHECK_LE(page->address(), start);
1015 DCHECK_LE(end, page->address() + Page::kPageSize);
1017 const size_t added_pages = page->active_system_pages()->Add(
1018 start - page->address(), end - page->address(),
1026 Page* page, ActiveSystemPages active_system_pages) {
1028 page->active_system_pages()->Reduce(active_system_pages);