Commit 0fa11bfb authored by ssid's avatar ssid Committed by Commit bot

Add boolean to tell if V8 zaps allocated memory

V8 zaps (writes 0xdeadbeef) over the mmapped regions when in debug mode.
This causes more resident size than displayed in tracing. So, This CL
adds an api to tell if zapping is done.

BUG=546492
LOG=Y

Review URL: https://codereview.chromium.org/1419523008

Cr-Commit-Position: refs/heads/master@{#31716}
parent 77c19034
......@@ -5081,6 +5081,7 @@ 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 does_zap_garbage() { return does_zap_garbage_; }
private:
size_t total_heap_size_;
......@@ -5089,6 +5090,7 @@ class V8_EXPORT HeapStatistics {
size_t total_available_size_;
size_t used_heap_size_;
size_t heap_size_limit_;
bool does_zap_garbage_;
friend class V8;
friend class Isolate;
......
......@@ -7306,6 +7306,7 @@ 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->does_zap_garbage_ = heap->ShouldZapGarbage();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment