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

Side by Side Diff: third_party/WebKit/Source/platform/heap/PagePool.h

Issue 2707193004: Remove unnecessary PagePool locks. (Closed)
Patch Set: remove now-redundant include Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/PagePool.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 #ifndef PagePool_h 5 #ifndef PagePool_h
6 #define PagePool_h 6 #define PagePool_h
7 7
8 #include "platform/heap/ThreadState.h" 8 #include "platform/heap/ThreadState.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/ThreadingPrimitives.h"
11 10
12 namespace blink { 11 namespace blink {
13 12
14 class PageMemory; 13 class PageMemory;
15 14
16 // Once pages have been used for one type of thread heap they will never be 15 // Once pages have been used for one type of thread heap they will never be
17 // reused for another type of thread heap. Instead of unmapping, we add the 16 // reused for another type of thread heap. Instead of unmapping, we add the
18 // pages to a pool of pages to be reused later by a thread heap of the same 17 // pages to a pool of pages to be reused later by a thread heap of the same
19 // type. This is done as a security feature to avoid type confusion. The 18 // type. This is done as a security feature to avoid type confusion. The
20 // heaps are type segregated by having separate thread arenas for different 19 // heaps are type segregated by having separate thread arenas for different
(...skipping 14 matching lines...) Expand all
35 USING_FAST_MALLOC(PoolEntry); 34 USING_FAST_MALLOC(PoolEntry);
36 35
37 public: 36 public:
38 PoolEntry(PageMemory* data, PoolEntry* next) : data(data), next(next) {} 37 PoolEntry(PageMemory* data, PoolEntry* next) : data(data), next(next) {}
39 38
40 PageMemory* data; 39 PageMemory* data;
41 PoolEntry* next; 40 PoolEntry* next;
42 }; 41 };
43 42
44 PoolEntry* m_pool[BlinkGC::NumberOfArenas]; 43 PoolEntry* m_pool[BlinkGC::NumberOfArenas];
45 Mutex m_mutex[BlinkGC::NumberOfArenas];
46 }; 44 };
47 45
48 } // namespace blink 46 } // namespace blink
49 47
50 #endif 48 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/PagePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698