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

Unified Diff: src/spaces.cc

Issue 174050: Temporarily revert the reduction of semispace sizes and the growth... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 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 | « src/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
===================================================================
--- src/spaces.cc (revision 2711)
+++ src/spaces.cc (working copy)
@@ -952,13 +952,13 @@
}
-bool NewSpace::Grow() {
- ASSERT(capacity_ < maximum_capacity_);
+bool NewSpace::Double() {
+ ASSERT(capacity_ <= maximum_capacity_ / 2);
// TODO(1240712): Failure to double the from space can result in
// semispaces of different sizes. In the event of that failure, the
// to space doubling should be rolled back before returning false.
- if (!to_space_.Grow() || !from_space_.Grow()) return false;
- capacity_ = to_space_.Capacity() + from_space_.Capacity();
+ if (!to_space_.Double() || !from_space_.Double()) return false;
+ capacity_ *= 2;
allocation_info_.limit = to_space_.high();
ASSERT_SEMISPACE_ALLOCATION_INFO(allocation_info_, to_space_);
return true;
@@ -1080,16 +1080,11 @@
}
-bool SemiSpace::Grow() {
- // Commit 50% extra space but only up to maximum capacity.
- int extra = RoundUp(capacity_ / 2, OS::AllocateAlignment());
- if (capacity_ + extra > maximum_capacity_) {
- extra = maximum_capacity_ - capacity_;
- }
- if (!MemoryAllocator::CommitBlock(high(), extra, executable())) {
+bool SemiSpace::Double() {
+ if (!MemoryAllocator::CommitBlock(high(), capacity_, executable())) {
return false;
}
- capacity_ += extra;
+ capacity_ *= 2;
return true;
}
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698