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

Unified Diff: src/isolate.cc

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Renamed defines to match new file locations 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d6b41ec2b125182ad2d00ee4014306eca1574dd8..4a1896ca23813f77f24650bef4f611565e96b352 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 {
@@ -1896,13 +1896,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) {
@@ -1913,8 +1913,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);
@@ -1969,7 +1969,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),

Powered by Google App Engine
This is Rietveld 408576698