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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 bool shouldScheduleV8FollowupGC(); | 695 bool shouldScheduleV8FollowupGC(); |
696 // Page navigation is likely to drop a lot of references to objects | 696 // Page navigation is likely to drop a lot of references to objects |
697 // on Oilpan's heap. We give a chance to schedule a GC. | 697 // on Oilpan's heap. We give a chance to schedule a GC. |
698 // estimatedRemovalRatio is the estimated ratio of objects that will be no | 698 // estimatedRemovalRatio is the estimated ratio of objects that will be no |
699 // longer necessary due to the navigation. | 699 // longer necessary due to the navigation. |
700 bool shouldSchedulePageNavigationGC(float estimatedRemovalRatio); | 700 bool shouldSchedulePageNavigationGC(float estimatedRemovalRatio); |
701 | 701 |
702 // Internal helper for GC policy handling code. Returns true if | 702 // Internal helper for GC policy handling code. Returns true if |
703 // an urgent conservative GC is now needed due to memory pressure. | 703 // an urgent conservative GC is now needed due to memory pressure. |
704 bool shouldForceMemoryPressureGC(); | 704 bool shouldForceMemoryPressureGC(); |
705 size_t estimatedLiveObjectSize(); | 705 size_t estimatedLiveSize(size_t currentSize, size_t sizeAtLastGC); |
706 size_t currentObjectSize(); | 706 size_t totalMemorySize(); |
707 double heapGrowingRate(); | 707 double heapGrowingRate(); |
| 708 double partitionAllocGrowingRate(); |
708 bool judgeGCThreshold(size_t allocatedObjectSizeThreshold, double heapGrowin
gRateThreshold); | 709 bool judgeGCThreshold(size_t allocatedObjectSizeThreshold, double heapGrowin
gRateThreshold); |
709 | 710 |
710 void runScheduledGC(StackState); | 711 void runScheduledGC(StackState); |
711 | 712 |
712 void eagerSweep(); | 713 void eagerSweep(); |
713 | 714 |
714 #if defined(ADDRESS_SANITIZER) | 715 #if defined(ADDRESS_SANITIZER) |
715 void poisonEagerHeap(Poisoning); | 716 void poisonEagerHeap(Poisoning); |
716 void poisonAllHeaps(); | 717 void poisonAllHeaps(); |
717 #endif | 718 #endif |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 }; | 826 }; |
826 | 827 |
827 template<> class ThreadStateFor<AnyThread> { | 828 template<> class ThreadStateFor<AnyThread> { |
828 public: | 829 public: |
829 static ThreadState* state() { return ThreadState::current(); } | 830 static ThreadState* state() { return ThreadState::current(); } |
830 }; | 831 }; |
831 | 832 |
832 } // namespace blink | 833 } // namespace blink |
833 | 834 |
834 #endif // ThreadState_h | 835 #endif // ThreadState_h |
OLD | NEW |