Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: runtime/vm/pages.h

Issue 1071393003: Before write-protecting a PageSpace, return bump allocation block to freelist. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PAGES_H_ 5 #ifndef VM_PAGES_H_
6 #define VM_PAGES_H_ 6 #define VM_PAGES_H_
7 7
8 #include "vm/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 bool is_locked); 361 bool is_locked);
362 uword TryAllocateInFreshPage(intptr_t size, 362 uword TryAllocateInFreshPage(intptr_t size,
363 HeapPage::PageType type, 363 HeapPage::PageType type,
364 GrowthPolicy growth_policy, 364 GrowthPolicy growth_policy,
365 bool is_locked); 365 bool is_locked);
366 uword TryAllocateDataBumpInternal(intptr_t size, 366 uword TryAllocateDataBumpInternal(intptr_t size,
367 GrowthPolicy growth_policy, 367 GrowthPolicy growth_policy,
368 bool is_locked); 368 bool is_locked);
369 // Makes bump block walkable; do not call concurrently with mutator. 369 // Makes bump block walkable; do not call concurrently with mutator.
370 void MakeIterable() const; 370 void MakeIterable() const;
371 // Return any bump allocation block to the freelist.
372 void AbandonBumpAllocation();
371 HeapPage* AllocatePage(HeapPage::PageType type); 373 HeapPage* AllocatePage(HeapPage::PageType type);
372 void FreePage(HeapPage* page, HeapPage* previous_page); 374 void FreePage(HeapPage* page, HeapPage* previous_page);
373 HeapPage* AllocateLargePage(intptr_t size, HeapPage::PageType type); 375 HeapPage* AllocateLargePage(intptr_t size, HeapPage::PageType type);
374 void TruncateLargePage(HeapPage* page, intptr_t new_object_size_in_bytes); 376 void TruncateLargePage(HeapPage* page, intptr_t new_object_size_in_bytes);
375 void FreeLargePage(HeapPage* page, HeapPage* previous_page); 377 void FreeLargePage(HeapPage* page, HeapPage* previous_page);
376 void FreePages(HeapPage* pages); 378 void FreePages(HeapPage* pages);
377 HeapPage* NextPageAnySize(HeapPage* page) const { 379 HeapPage* NextPageAnySize(HeapPage* page) const {
378 ASSERT((pages_tail_ == NULL) || (pages_tail_->next() == NULL)); 380 ASSERT((pages_tail_ == NULL) || (pages_tail_->next() == NULL));
379 ASSERT((exec_pages_tail_ == NULL) || (exec_pages_tail_->next() == NULL)); 381 ASSERT((exec_pages_tail_ == NULL) || (exec_pages_tail_->next() == NULL));
380 if (page == pages_tail_) { 382 if (page == pages_tail_) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 friend class ExclusiveLargePageIterator; 434 friend class ExclusiveLargePageIterator;
433 friend class PageSpaceController; 435 friend class PageSpaceController;
434 friend class SweeperTask; 436 friend class SweeperTask;
435 437
436 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 438 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
437 }; 439 };
438 440
439 } // namespace dart 441 } // namespace dart
440 442
441 #endif // VM_PAGES_H_ 443 #endif // VM_PAGES_H_
OLDNEW
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | runtime/vm/pages.cc » ('j') | runtime/vm/pages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698