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

Side by Side Diff: third_party/WebKit/Source/platform/MemoryUsageProvider.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MemoryUsageProvider_h
6 #define MemoryUsageProvider_h
7
8 #include "public/platform/WebCommon.h"
9 #include "public/platform/WebMemoryDumpProvider.h"
10 #include "wtf/Allocator.h"
11 #include "wtf/Noncopyable.h"
12
13 namespace v8 {
14 class Isolate;
15 }
haraken 2016/02/04 12:00:29 Nit: We normally just include <v8.h>.
peria 2016/02/08 08:41:10 It is not visible from platform/heap/HeapPage.h, w
16
17 namespace blink {
18
19 class MemoryUsageProvider {
20 USING_FAST_MALLOC(MemoryUsageProvider);
21 WTF_MAKE_NONCOPYABLE(MemoryUsageProvider);
22 public:
23 static MemoryUsageProvider* instance();
haraken 2016/02/04 12:00:29 Instead of making this class a singleton, it might
peria 2016/02/08 08:41:10 This method is expected to return thread specific
24 MemoryUsageProvider();
25 ~MemoryUsageProvider();
26
27 void setIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
28
29 void adjustAmountOfAllocatedMemory();
30
31 private:
32
33 v8::Isolate* m_isolate;
34 int64_t m_previousSize;
35 };
36
37 } // namespace blink
38
39 #endif // PartitionAllocMemoryDumpProvider_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698