Skip to content

Commit 4c774e1

Browse files
committed
deps: remove extra field from v8::HeapStatistics
Remove the `_malloced_memory` field from the `HeapStatistics` class to achieve full ABI compatibility with V8 5.0. Ref: #7016 PR-URL: #7526 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 0f3149e commit 4c774e1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

deps/v8/include/v8.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5202,7 +5202,6 @@ class V8_EXPORT HeapStatistics {
52025202
size_t total_available_size() { return total_available_size_; }
52035203
size_t used_heap_size() { return used_heap_size_; }
52045204
size_t heap_size_limit() { return heap_size_limit_; }
5205-
size_t malloced_memory() { return malloced_memory_; }
52065205
size_t does_zap_garbage() { return does_zap_garbage_; }
52075206

52085207
private:
@@ -5213,7 +5212,6 @@ class V8_EXPORT HeapStatistics {
52135212
size_t used_heap_size_;
52145213
size_t heap_size_limit_;
52155214
bool does_zap_garbage_;
5216-
size_t malloced_memory_;
52175215

52185216
friend class V8;
52195217
friend class Isolate;

deps/v8/src/api.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5526,8 +5526,7 @@ HeapStatistics::HeapStatistics()
55265526
total_available_size_(0),
55275527
used_heap_size_(0),
55285528
heap_size_limit_(0),
5529-
does_zap_garbage_(0),
5530-
malloced_memory_(0) {}
5529+
does_zap_garbage_(0) {}
55315530

55325531
HeapSpaceStatistics::HeapSpaceStatistics(): space_name_(0),
55335532
space_size_(0),
@@ -7428,8 +7427,6 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
74287427
heap_statistics->total_available_size_ = heap->Available();
74297428
heap_statistics->used_heap_size_ = heap->SizeOfObjects();
74307429
heap_statistics->heap_size_limit_ = heap->MaxReserved();
7431-
heap_statistics->malloced_memory_ =
7432-
isolate->allocator()->GetCurrentMemoryUsage();
74337430
heap_statistics->does_zap_garbage_ = heap->ShouldZapGarbage();
74347431
}
74357432

0 commit comments

Comments
 (0)