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

Unified Diff: src/heap/heap.cc

Issue 528993002: First step to cleanup the power-of-2 mess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clang-format Created 6 years, 3 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/hashmap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 6781711defa7fdb90813f2109a3ac25a11cc67a8..65ad7bc98a719347b981a8f7bd72131069b4f210 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -6,6 +6,7 @@
#include "src/accessors.h"
#include "src/api.h"
+#include "src/base/bits.h"
#include "src/base/once.h"
#include "src/base/utils/random-number-generator.h"
#include "src/bootstrapper.h"
@@ -4854,8 +4855,10 @@ bool Heap::ConfigureHeap(int max_semi_space_size, int max_old_space_size,
// The new space size must be a power of two to support single-bit testing
// for containment.
- max_semi_space_size_ = RoundUpToPowerOf2(max_semi_space_size_);
- reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_);
+ max_semi_space_size_ =
+ base::bits::RoundUpToPowerOfTwo32(max_semi_space_size_);
+ reserved_semispace_size_ =
+ base::bits::RoundUpToPowerOfTwo32(reserved_semispace_size_);
if (FLAG_min_semi_space_size > 0) {
int initial_semispace_size = FLAG_min_semi_space_size * MB;
« no previous file with comments | « src/hashmap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698