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

Unified Diff: runtime/vm/pages.h

Issue 70993002: - Convert heap sizes to words from bytes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/find_code_object_test.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.h
===================================================================
--- runtime/vm/pages.h (revision 30540)
+++ runtime/vm/pages.h (working copy)
@@ -18,8 +18,7 @@
class Heap;
class ObjectPointerVisitor;
-// An aligned page containing old generation objects. Alignment is used to be
-// able to get to a HeapPage header quickly based on a pointer to an object.
+// A page containing old generation objects.
class HeapPage {
public:
enum PageType {
@@ -64,7 +63,7 @@
}
static HeapPage* Initialize(VirtualMemory* memory, PageType type);
- static HeapPage* Allocate(intptr_t size, PageType type);
+ static HeapPage* Allocate(intptr_t size_in_words, PageType type);
// Deallocate the virtual memory backing this page. The page pointer to this
// page becomes immediately inaccessible.
@@ -171,8 +170,7 @@
class PageSpace {
public:
// TODO(iposva): Determine heap sizes and tune the page size accordingly.
- static const intptr_t kPageSize = 256 * KB;
- static const intptr_t kPageAlignment = kPageSize;
+ static const intptr_t kPageSizeInWords = 256 * KBInWords;
enum GrowthPolicy {
kControlGrowth,
@@ -243,7 +241,7 @@
void FreeLargePage(HeapPage* page, HeapPage* previous_page);
void FreePages(HeapPage* pages);
- static intptr_t LargePageSizeFor(intptr_t size);
+ static intptr_t LargePageSizeInWordsFor(intptr_t size);
bool CanIncreaseCapacityInWords(intptr_t increase_in_words) {
ASSERT(capacity_in_words_ <= max_capacity_in_words_);
« no previous file with comments | « runtime/vm/find_code_object_test.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698