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

Side by Side Diff: src/api.cc

Issue 1419523008: Add boolean to tell if V8 zaps allocated memory (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename. Created 5 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 unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7155 matching lines...) Expand 10 before | Expand all | Expand 10 after
7166 void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) { 7166 void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
7167 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7167 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7168 i::Heap* heap = isolate->heap(); 7168 i::Heap* heap = isolate->heap();
7169 heap_statistics->total_heap_size_ = heap->CommittedMemory(); 7169 heap_statistics->total_heap_size_ = heap->CommittedMemory();
7170 heap_statistics->total_heap_size_executable_ = 7170 heap_statistics->total_heap_size_executable_ =
7171 heap->CommittedMemoryExecutable(); 7171 heap->CommittedMemoryExecutable();
7172 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); 7172 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory();
7173 heap_statistics->total_available_size_ = heap->Available(); 7173 heap_statistics->total_available_size_ = heap->Available();
7174 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); 7174 heap_statistics->used_heap_size_ = heap->SizeOfObjects();
7175 heap_statistics->heap_size_limit_ = heap->MaxReserved(); 7175 heap_statistics->heap_size_limit_ = heap->MaxReserved();
7176 heap_statistics->does_zap_garbage_ = heap->ShouldZapGarbage();
7176 } 7177 }
7177 7178
7178 7179
7179 size_t Isolate::NumberOfHeapSpaces() { 7180 size_t Isolate::NumberOfHeapSpaces() {
7180 return i::LAST_SPACE - i::FIRST_SPACE + 1; 7181 return i::LAST_SPACE - i::FIRST_SPACE + 1;
7181 } 7182 }
7182 7183
7183 7184
7184 bool Isolate::GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, 7185 bool Isolate::GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics,
7185 size_t index) { 7186 size_t index) {
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
8362 Address callback_address = 8363 Address callback_address =
8363 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8364 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8364 VMState<EXTERNAL> state(isolate); 8365 VMState<EXTERNAL> state(isolate);
8365 ExternalCallbackScope call_scope(isolate, callback_address); 8366 ExternalCallbackScope call_scope(isolate, callback_address);
8366 callback(info); 8367 callback(info);
8367 } 8368 }
8368 8369
8369 8370
8370 } // namespace internal 8371 } // namespace internal
8371 } // namespace v8 8372 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698