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

Unified Diff: runtime/platform/globals.h

Issue 11276022: Avoid integer overflow when computing the size of new space in bytes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 2 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 | « no previous file | runtime/vm/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index b86a23df163239463b909e9bf7ef3fad924a55bc..95585b15e2ba13cee9221582260782d646f47193 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -167,9 +167,9 @@ const int kBitsPerByteLog2 = 3;
const int kBitsPerWord = kWordSize * kBitsPerByte;
// System-wide named constants.
-const int KB = 1024;
-const int MB = KB * KB;
-const int GB = KB * KB * KB;
+const intptr_t KB = 1024;
+const intptr_t MB = KB * KB;
+const intptr_t GB = KB * KB * KB;
const intptr_t kIntptrOne = 1;
const intptr_t kIntptrMin = (kIntptrOne << (kBitsPerWord - 1));
const intptr_t kIntptrMax = ~kIntptrMin;
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698