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

Unified Diff: include/v8.h

Issue 1964023002: [heap] Fine-grained JSArrayBuffer tracking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests, harden expectations, more comments Created 4 years, 7 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 | src/heap/array-buffer-tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 52b6192b87643bec0a0abff62dac9864da01baf7..3ef2e025dbc776cd06af1895058a446807bd27ff 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7343,9 +7343,9 @@ class Internals {
static const int kAmountOfExternalAllocatedMemoryOffset =
4 * kApiPointerSize;
static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset =
- kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size;
+ kAmountOfExternalAllocatedMemoryOffset + kApiPointerSize;
static const int kIsolateRootsOffset =
- kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size +
+ kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiPointerSize +
kApiPointerSize;
static const int kUndefinedValueRootIndex = 4;
static const int kTheHoleValueRootIndex = 5;
@@ -8552,14 +8552,15 @@ uint32_t Isolate::GetNumberOfDataSlots() {
int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
int64_t change_in_bytes) {
typedef internal::Internals I;
- int64_t* amount_of_external_allocated_memory =
- reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(this) +
- I::kAmountOfExternalAllocatedMemoryOffset);
- int64_t* amount_of_external_allocated_memory_at_last_global_gc =
- reinterpret_cast<int64_t*>(
+ intptr_t* amount_of_external_allocated_memory =
+ reinterpret_cast<intptr_t*>(reinterpret_cast<uint8_t*>(this) +
+ I::kAmountOfExternalAllocatedMemoryOffset);
+ intptr_t* amount_of_external_allocated_memory_at_last_global_gc =
+ reinterpret_cast<intptr_t*>(
Michael Lippautz 2016/05/11 08:22:51 It's really unfortunate that we require this magic
reinterpret_cast<uint8_t*>(this) +
I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset);
- int64_t amount = *amount_of_external_allocated_memory + change_in_bytes;
+ intptr_t amount = *amount_of_external_allocated_memory +
+ static_cast<intptr_t>(change_in_bytes);
if (change_in_bytes > 0 &&
amount - *amount_of_external_allocated_memory_at_last_global_gc >
I::kExternalAllocationLimit) {
« no previous file with comments | « no previous file | src/heap/array-buffer-tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698