Skip to content

Commit

Permalink
deps: remove extra field from v8::HeapStatistics
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax committed Jul 7, 2016
1 parent 0f3149e commit 4c774e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions deps/v8/include/v8.h
Expand Up @@ -5202,7 +5202,6 @@ class V8_EXPORT HeapStatistics {
size_t total_available_size() { return total_available_size_; }
size_t used_heap_size() { return used_heap_size_; }
size_t heap_size_limit() { return heap_size_limit_; }
size_t malloced_memory() { return malloced_memory_; }
size_t does_zap_garbage() { return does_zap_garbage_; }

private:
Expand All @@ -5213,7 +5212,6 @@ class V8_EXPORT HeapStatistics {
size_t used_heap_size_;
size_t heap_size_limit_;
bool does_zap_garbage_;
size_t malloced_memory_;

friend class V8;
friend class Isolate;
Expand Down
5 changes: 1 addition & 4 deletions deps/v8/src/api.cc
Expand Up @@ -5526,8 +5526,7 @@ HeapStatistics::HeapStatistics()
total_available_size_(0),
used_heap_size_(0),
heap_size_limit_(0),
does_zap_garbage_(0),
malloced_memory_(0) {}
does_zap_garbage_(0) {}

HeapSpaceStatistics::HeapSpaceStatistics(): space_name_(0),
space_size_(0),
Expand Down Expand Up @@ -7428,8 +7427,6 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
heap_statistics->total_available_size_ = heap->Available();
heap_statistics->used_heap_size_ = heap->SizeOfObjects();
heap_statistics->heap_size_limit_ = heap->MaxReserved();
heap_statistics->malloced_memory_ =
isolate->allocator()->GetCurrentMemoryUsage();
heap_statistics->does_zap_garbage_ = heap->ShouldZapGarbage();
}

Expand Down

0 comments on commit 4c774e1

Please sign in to comment.