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

Unified Diff: runtime/vm/pages.h

Issue 14190014: - Disassociate old page size from new allocatable size. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/heap.h ('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 22017)
+++ runtime/vm/pages.h (working copy)
@@ -41,12 +41,6 @@
return object_end_;
}
- void set_used(uword used) { used_ = used; }
- uword used() const { return used_; }
- void AddUsed(uword size) {
- used_ += size;
- }
-
PageType type() const {
return executable_ ? kExecutable : kData;
}
@@ -77,7 +71,6 @@
VirtualMemory* memory_;
HeapPage* next_;
- uword used_;
uword object_end_;
bool executable_;
@@ -190,9 +183,6 @@
bool IsValidAddress(uword addr) const {
return Contains(addr);
}
- static bool IsPageAllocatableSize(intptr_t size) {
- return size <= kAllocatablePageSize;
- }
void VisitObjects(ObjectVisitor* visitor) const;
void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
@@ -203,11 +193,6 @@
// Collect the garbage in the page space using mark-sweep.
void MarkSweep(bool invoke_api_callbacks);
- static HeapPage* PageFor(RawObject* raw_obj) {
- return reinterpret_cast<HeapPage*>(
- RawObject::ToAddr(raw_obj) & ~(kPageSize -1));
- }
-
void StartEndAddress(uword* start, uword* end) const;
void SetGrowthControlState(bool state) {
@@ -245,7 +230,7 @@
kAllowedGrowth = 3
};
- static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage);
+ static const intptr_t kAllocatablePageSize = 64 * KB;
HeapPage* AllocatePage(HeapPage::PageType type);
void FreePage(HeapPage* page, HeapPage* previous_page);
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698