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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 bool shouldForceConservativeGC(); | 693 bool shouldForceConservativeGC(); |
694 // estimatedRemovalRatio is the estimated ratio of objects that will be no | 694 // estimatedRemovalRatio is the estimated ratio of objects that will be no |
695 // longer necessary due to the navigation. | 695 // longer necessary due to the navigation. |
696 bool shouldSchedulePageNavigationGC(float estimatedRemovalRatio); | 696 bool shouldSchedulePageNavigationGC(float estimatedRemovalRatio); |
697 | 697 |
698 // Internal helper for GC policy handling code. Returns true if | 698 // Internal helper for GC policy handling code. Returns true if |
699 // an urgent conservative GC is now needed due to memory pressure. | 699 // an urgent conservative GC is now needed due to memory pressure. |
700 bool shouldForceMemoryPressureGC(); | 700 bool shouldForceMemoryPressureGC(); |
701 size_t estimatedLiveObjectSize(); | 701 size_t estimatedLiveObjectSize(); |
702 size_t currentObjectSize(); | 702 size_t currentObjectSize(); |
| 703 double heapGrowingRate(); |
| 704 bool judgeGCThreshold(size_t allocatedObjectSizeThreshold, double heapGrowin
gRateThreshold); |
703 | 705 |
704 void runScheduledGC(StackState); | 706 void runScheduledGC(StackState); |
705 | 707 |
706 void eagerSweep(); | 708 void eagerSweep(); |
707 | 709 |
708 #if defined(ADDRESS_SANITIZER) | 710 #if defined(ADDRESS_SANITIZER) |
709 void poisonEagerHeap(Poisoning); | 711 void poisonEagerHeap(Poisoning); |
710 void poisonAllHeaps(); | 712 void poisonAllHeaps(); |
711 #endif | 713 #endif |
712 | 714 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 }; | 821 }; |
820 | 822 |
821 template<> class ThreadStateFor<AnyThread> { | 823 template<> class ThreadStateFor<AnyThread> { |
822 public: | 824 public: |
823 static ThreadState* state() { return ThreadState::current(); } | 825 static ThreadState* state() { return ThreadState::current(); } |
824 }; | 826 }; |
825 | 827 |
826 } // namespace blink | 828 } // namespace blink |
827 | 829 |
828 #endif // ThreadState_h | 830 #endif // ThreadState_h |
OLD | NEW |