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

Unified Diff: src/heap-inl.h

Issue 70233010: API: Change AdjustAmountOfExternalAllocatedMemory calls to use int64_t instead of intptr_t (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
« include/v8.h ('K') | « src/heap.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 168aa50b36e540b2467c9a2d63da90f0c3c7cbb2..9d57c995ca0a566f40de9848491743655b3dd9b7 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -541,10 +541,10 @@ MaybeObject* Heap::PrepareForCompare(String* str) {
}
-intptr_t Heap::AdjustAmountOfExternalAllocatedMemory(
- intptr_t change_in_bytes) {
+int64_t Heap::AdjustAmountOfExternalAllocatedMemory(
+ int64_t change_in_bytes) {
ASSERT(HasBeenSetUp());
- intptr_t amount = amount_of_external_allocated_memory_ + change_in_bytes;
+ int64_t amount = amount_of_external_allocated_memory_ + change_in_bytes;
if (change_in_bytes > 0) {
// Avoid overflow.
if (amount > amount_of_external_allocated_memory_) {
@@ -554,7 +554,7 @@ intptr_t Heap::AdjustAmountOfExternalAllocatedMemory(
amount_of_external_allocated_memory_ = 0;
amount_of_external_allocated_memory_at_last_global_gc_ = 0;
}
- intptr_t amount_since_last_global_gc = PromotedExternalMemorySize();
+ int64_t amount_since_last_global_gc = PromotedExternalMemorySize();
if (amount_since_last_global_gc > external_allocation_limit_) {
CollectAllGarbage(kNoGCFlags, "external memory allocation limit reached");
}
@@ -573,9 +573,9 @@ intptr_t Heap::AdjustAmountOfExternalAllocatedMemory(
PrintF("Adjust amount of external memory: delta=%6" V8_PTR_PREFIX "d KB, "
"amount=%6" V8_PTR_PREFIX "d KB, since_gc=%6" V8_PTR_PREFIX "d KB, "
"isolate=0x%08" V8PRIxPTR ".\n",
- change_in_bytes / KB,
- amount_of_external_allocated_memory_ / KB,
- PromotedExternalMemorySize() / KB,
+ static_cast<intptr_t>(change_in_bytes / KB),
+ static_cast<intptr_t>(amount_of_external_allocated_memory_ / KB),
+ static_cast<intptr_t>(PromotedExternalMemorySize() / KB),
reinterpret_cast<intptr_t>(isolate()));
}
ASSERT(amount_of_external_allocated_memory_ >= 0);
« include/v8.h ('K') | « src/heap.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698