OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 // Performs garbage collection operation. | 627 // Performs garbage collection operation. |
628 // Returns whether required_space bytes are available after the collection. | 628 // Returns whether required_space bytes are available after the collection. |
629 static bool CollectGarbage(int required_space, AllocationSpace space); | 629 static bool CollectGarbage(int required_space, AllocationSpace space); |
630 | 630 |
631 // Performs a full garbage collection. Force compaction if the | 631 // Performs a full garbage collection. Force compaction if the |
632 // parameter is true. | 632 // parameter is true. |
633 static void CollectAllGarbage(bool force_compaction); | 633 static void CollectAllGarbage(bool force_compaction); |
634 | 634 |
635 // Performs a full garbage collection if a context has been disposed | 635 // Performs a full garbage collection if a context has been disposed |
636 // since the last time the check was performed. | 636 // since the last time the check was performed. |
637 static void CollectAllGarbageIfContextDisposed(); | 637 static void CollectAllGarbageIfContextDisposed(bool notified); |
638 | 638 |
639 // Notify the heap that a context has been disposed. | 639 // Notify the heap that a context has been disposed. |
640 static void NotifyContextDisposed(); | 640 static void NotifyContextDisposed(); |
641 | 641 |
642 // Utility to invoke the scavenger. This is needed in test code to | 642 // Utility to invoke the scavenger. This is needed in test code to |
643 // ensure correct callback for weak global handles. | 643 // ensure correct callback for weak global handles. |
644 static void PerformScavenge(); | 644 static void PerformScavenge(); |
645 | 645 |
646 #ifdef DEBUG | 646 #ifdef DEBUG |
647 // Utility used with flag gc-greedy. | 647 // Utility used with flag gc-greedy. |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 | 1725 |
1726 // To speed up scavenge collections new space string are kept | 1726 // To speed up scavenge collections new space string are kept |
1727 // separate from old space strings. | 1727 // separate from old space strings. |
1728 static List<Object*> new_space_strings_; | 1728 static List<Object*> new_space_strings_; |
1729 static List<Object*> old_space_strings_; | 1729 static List<Object*> old_space_strings_; |
1730 }; | 1730 }; |
1731 | 1731 |
1732 } } // namespace v8::internal | 1732 } } // namespace v8::internal |
1733 | 1733 |
1734 #endif // V8_HEAP_H_ | 1734 #endif // V8_HEAP_H_ |
OLD | NEW |