OLD | NEW |
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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 static bool popAndInvokeTraceCallback(Visitor*); | 773 static bool popAndInvokeTraceCallback(Visitor*); |
774 | 774 |
775 // Pop the top of the weak callback stack and call the callback with the vis
itor | 775 // Pop the top of the weak callback stack and call the callback with the vis
itor |
776 // and the object. Returns false when there is nothing more to do. | 776 // and the object. Returns false when there is nothing more to do. |
777 static bool popAndInvokeWeakPointerCallback(Visitor*); | 777 static bool popAndInvokeWeakPointerCallback(Visitor*); |
778 | 778 |
779 template<typename T> static Address allocate(size_t); | 779 template<typename T> static Address allocate(size_t); |
780 template<typename T> static Address reallocate(void* previous, size_t); | 780 template<typename T> static Address reallocate(void* previous, size_t); |
781 | 781 |
782 static void collectGarbage(ThreadState::StackState, GCType = Normal); | 782 static void collectGarbage(ThreadState::StackState, GCType = Normal); |
| 783 static void collectAllGarbage(ThreadState::StackState, GCType = Normal); |
783 | 784 |
784 static void prepareForGC(); | 785 static void prepareForGC(); |
785 | 786 |
786 // Conservatively checks whether an address is a pointer in any of the threa
d | 787 // Conservatively checks whether an address is a pointer in any of the threa
d |
787 // heaps. If so marks the object pointed to as live. | 788 // heaps. If so marks the object pointed to as live. |
788 static Address checkAndMarkPointer(Visitor*, Address); | 789 static Address checkAndMarkPointer(Visitor*, Address); |
789 | 790 |
790 // Collect heap stats for all threads attached to the Blink | 791 // Collect heap stats for all threads attached to the Blink |
791 // garbage collector. Should only be called during garbage | 792 // garbage collector. Should only be called during garbage |
792 // collection where threads are known to be at safe points. | 793 // collection where threads are known to be at safe points. |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 // to export. This forces it to export all the methods from ThreadHeap. | 1692 // to export. This forces it to export all the methods from ThreadHeap. |
1692 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1693 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
1693 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1694 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
1694 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1695 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
1695 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1696 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
1696 #endif | 1697 #endif |
1697 | 1698 |
1698 } | 1699 } |
1699 | 1700 |
1700 #endif // Heap_h | 1701 #endif // Heap_h |
OLD | NEW |