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

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

Issue 2684633004: Remove orphaned pages from Oilpan (Closed)
Patch Set: temp 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 30 matching lines...) Expand all
41 #include "wtf/AddressSanitizer.h" 41 #include "wtf/AddressSanitizer.h"
42 #include "wtf/Allocator.h" 42 #include "wtf/Allocator.h"
43 #include "wtf/Assertions.h" 43 #include "wtf/Assertions.h"
44 #include "wtf/Atomics.h" 44 #include "wtf/Atomics.h"
45 #include "wtf/Forward.h" 45 #include "wtf/Forward.h"
46 #include <memory> 46 #include <memory>
47 47
48 namespace blink { 48 namespace blink {
49 49
50 class FreePagePool; 50 class FreePagePool;
51 class OrphanedPagePool;
52 51
53 class PLATFORM_EXPORT HeapAllocHooks { 52 class PLATFORM_EXPORT HeapAllocHooks {
54 public: 53 public:
55 // TODO(hajimehoshi): Pass a type name of the allocated object. 54 // TODO(hajimehoshi): Pass a type name of the allocated object.
56 typedef void AllocationHook(Address, size_t, const char*); 55 typedef void AllocationHook(Address, size_t, const char*);
57 typedef void FreeHook(Address); 56 typedef void FreeHook(Address);
58 57
59 static void setAllocationHook(AllocationHook* hook) { 58 static void setAllocationHook(AllocationHook* hook) {
60 m_allocationHook = hook; 59 m_allocationHook = hook;
61 } 60 }
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 Address checkAndMarkPointer(Visitor*, 436 Address checkAndMarkPointer(Visitor*,
438 Address, 437 Address,
439 MarkedPointerCallbackForTesting); 438 MarkedPointerCallbackForTesting);
440 #endif 439 #endif
441 440
442 size_t objectPayloadSizeForTesting(); 441 size_t objectPayloadSizeForTesting();
443 442
444 void flushHeapDoesNotContainCache(); 443 void flushHeapDoesNotContainCache();
445 444
446 FreePagePool* getFreePagePool() { return m_freePagePool.get(); } 445 FreePagePool* getFreePagePool() { return m_freePagePool.get(); }
447 OrphanedPagePool* getOrphanedPagePool() { return m_orphanedPagePool.get(); }
448 446
449 // This look-up uses the region search tree and a negative contains cache to 447 // This look-up uses the region search tree and a negative contains cache to
450 // provide an efficient mapping from arbitrary addresses to the containing 448 // provide an efficient mapping from arbitrary addresses to the containing
451 // heap-page if one exists. 449 // heap-page if one exists.
452 BasePage* lookupPageForAddress(Address); 450 BasePage* lookupPageForAddress(Address);
453 451
454 static const GCInfo* gcInfo(size_t gcInfoIndex) { 452 static const GCInfo* gcInfo(size_t gcInfoIndex) {
455 ASSERT(gcInfoIndex >= 1); 453 ASSERT(gcInfoIndex >= 1);
456 ASSERT(gcInfoIndex < GCInfoTable::maxIndex); 454 ASSERT(gcInfoIndex < GCInfoTable::maxIndex);
457 ASSERT(s_gcInfoTable); 455 ASSERT(s_gcInfoTable);
(...skipping 17 matching lines...) Expand all
475 void commitCallbackStacks(); 473 void commitCallbackStacks();
476 void decommitCallbackStacks(); 474 void decommitCallbackStacks();
477 475
478 RecursiveMutex m_threadAttachMutex; 476 RecursiveMutex m_threadAttachMutex;
479 ThreadStateSet m_threads; 477 ThreadStateSet m_threads;
480 ThreadHeapStats m_stats; 478 ThreadHeapStats m_stats;
481 std::unique_ptr<RegionTree> m_regionTree; 479 std::unique_ptr<RegionTree> m_regionTree;
482 std::unique_ptr<HeapDoesNotContainCache> m_heapDoesNotContainCache; 480 std::unique_ptr<HeapDoesNotContainCache> m_heapDoesNotContainCache;
483 std::unique_ptr<SafePointBarrier> m_safePointBarrier; 481 std::unique_ptr<SafePointBarrier> m_safePointBarrier;
484 std::unique_ptr<FreePagePool> m_freePagePool; 482 std::unique_ptr<FreePagePool> m_freePagePool;
485 std::unique_ptr<OrphanedPagePool> m_orphanedPagePool;
486 std::unique_ptr<CallbackStack> m_markingStack; 483 std::unique_ptr<CallbackStack> m_markingStack;
487 std::unique_ptr<CallbackStack> m_postMarkingCallbackStack; 484 std::unique_ptr<CallbackStack> m_postMarkingCallbackStack;
488 std::unique_ptr<CallbackStack> m_globalWeakCallbackStack; 485 std::unique_ptr<CallbackStack> m_globalWeakCallbackStack;
489 std::unique_ptr<CallbackStack> m_ephemeronStack; 486 std::unique_ptr<CallbackStack> m_ephemeronStack;
490 BlinkGC::GCReason m_lastGCReason; 487 BlinkGC::GCReason m_lastGCReason;
491 StackFrameDepth m_stackFrameDepth; 488 StackFrameDepth m_stackFrameDepth;
492 489
493 std::unique_ptr<HeapCompact> m_compaction; 490 std::unique_ptr<HeapCompact> m_compaction;
494 491
495 static ThreadHeap* s_mainThreadHeap; 492 static ThreadHeap* s_mainThreadHeap;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 T** cell = reinterpret_cast<T**>(object); 697 T** cell = reinterpret_cast<T**>(object);
701 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) 698 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell))
702 *cell = nullptr; 699 *cell = nullptr;
703 } 700 }
704 701
705 } // namespace blink 702 } // namespace blink
706 703
707 #include "platform/heap/VisitorImpl.h" 704 #include "platform/heap/VisitorImpl.h"
708 705
709 #endif // Heap_h 706 #endif // Heap_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GCInfo.cpp ('k') | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698