Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index c4c806817e4e4eb03b614a0daf6e5b17fa695dfb..678aacfa10ad58775b5448f0304201486f2f4730 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -1081,7 +1081,10 @@ class Heap { |
| inline intptr_t PromotedTotalSize() { |
| int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize(); |
| - if (total > kMaxInt) return static_cast<intptr_t>(kMaxInt); |
| + if (sizeof(int) < sizeof(int64_t) && total > kMaxInt) { |
|
Jakob Kummerow
2015/05/19 14:23:25
Isn't "sizeof(int) < sizeof(int64_t)" true on all
Sven Panne
2015/05/19 14:41:46
Currently, yes (see http://www.unix.org/whitepaper
Erik Corry Chromium.org
2015/05/19 15:04:18
Oh yeah, good point.
Erik Corry Chromium.org
2015/05/19 15:04:18
Yes, see the TODO. There's no difference between
|
| + // TODO(erikcorry): Use uintptr_t everywhere we do heap size calculations. |
| + return static_cast<intptr_t>(kMaxInt); |
| + } |
| if (total < 0) return 0; |
| return static_cast<intptr_t>(total); |
| } |