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

Side by Side Diff: vm/pages.h

Issue 9027017: - Promote objects from new gen to old space if they survived a scavenge. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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
« no previous file with comments | « vm/object.cc ('k') | vm/pages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/virtual_memory.h" 10 #include "vm/virtual_memory.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 private: 97 private:
98 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage); 98 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage);
99 99
100 void AllocatePage(); 100 void AllocatePage();
101 HeapPage* AllocateLargePage(intptr_t size); 101 HeapPage* AllocateLargePage(intptr_t size);
102 void FreeLargePage(HeapPage* page, HeapPage* previous_page); 102 void FreeLargePage(HeapPage* page, HeapPage* previous_page);
103 void FreePages(HeapPage* pages); 103 void FreePages(HeapPage* pages);
104 104
105 static intptr_t LargePageSizeFor(intptr_t size); 105 static intptr_t LargePageSizeFor(intptr_t size);
106 bool CanIncreaseCapacity(intptr_t increase) { 106 bool CanIncreaseCapacity(intptr_t increase) {
107 ASSERT(capacity_ < max_capacity_); 107 ASSERT(capacity_ <= max_capacity_);
108 return increase <= (max_capacity_ - capacity_); 108 return increase <= (max_capacity_ - capacity_);
109 } 109 }
110 110
111 uword TryBumpAllocate(intptr_t size); 111 uword TryBumpAllocate(intptr_t size);
112 112
113 FreeList freelist_; 113 FreeList freelist_;
114 114
115 Heap* heap_; 115 Heap* heap_;
116 116
117 HeapPage* pages_; 117 HeapPage* pages_;
(...skipping 12 matching lines...) Expand all
130 130
131 // Keep track whether a MarkSweep is currently running. 131 // Keep track whether a MarkSweep is currently running.
132 bool sweeping_; 132 bool sweeping_;
133 133
134 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 134 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
135 }; 135 };
136 136
137 } // namespace dart 137 } // namespace dart
138 138
139 #endif // VM_PAGES_H_ 139 #endif // VM_PAGES_H_
OLDNEW
« no previous file with comments | « vm/object.cc ('k') | vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698