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

Unified Diff: src/isolate.cc

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Merge branch 'master' into zonefolder Created 4 years, 3 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 | « src/isolate.h ('k') | src/machine-type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index cf319454d39ea1ef53b0fa9cd8c3d5331883ac1f..768d91b6d938a5ee205679b0de0fc4c60e19d090 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -10,7 +10,6 @@
#include <sstream>
#include "src/ast/context-slot-cache.h"
-#include "src/base/accounting-allocator.h"
#include "src/base/hashmap.h"
#include "src/base/platform/platform.h"
#include "src/base/sys-info.h"
@@ -43,6 +42,7 @@
#include "src/version.h"
#include "src/vm-state-inl.h"
#include "src/wasm/wasm-module.h"
+#include "src/zone/accounting-allocator.h"
namespace v8 {
namespace internal {
@@ -1898,13 +1898,13 @@ void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) {
#define TRACE_ISOLATE(tag)
#endif
-class VerboseAccountingAllocator : public base::AccountingAllocator {
+class VerboseAccountingAllocator : public AccountingAllocator {
public:
VerboseAccountingAllocator(Heap* heap, size_t sample_bytes)
: heap_(heap), last_memory_usage_(0), sample_bytes_(sample_bytes) {}
- void* Allocate(size_t size) override {
- void* memory = base::AccountingAllocator::Allocate(size);
+ v8::internal::Segment* AllocateSegment(size_t size) override {
+ v8::internal::Segment* memory = AccountingAllocator::AllocateSegment(size);
if (memory) {
size_t current = GetCurrentMemoryUsage();
if (last_memory_usage_.Value() + sample_bytes_ < current) {
@@ -1915,8 +1915,8 @@ class VerboseAccountingAllocator : public base::AccountingAllocator {
return memory;
}
- void Free(void* memory, size_t bytes) override {
- base::AccountingAllocator::Free(memory, bytes);
+ void FreeSegment(v8::internal::Segment* memory) override {
+ AccountingAllocator::FreeSegment(memory);
size_t current = GetCurrentMemoryUsage();
if (current + sample_bytes_ < last_memory_usage_.Value()) {
PrintJSON(current);
@@ -1971,7 +1971,7 @@ Isolate::Isolate(bool enable_serializer)
unicode_cache_(NULL),
allocator_(FLAG_trace_gc_object_stats
? new VerboseAccountingAllocator(&heap_, 256 * KB)
- : new base::AccountingAllocator()),
+ : new AccountingAllocator()),
runtime_zone_(new Zone(allocator_)),
inner_pointer_to_code_cache_(NULL),
global_handles_(NULL),
« no previous file with comments | « src/isolate.h ('k') | src/machine-type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698