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 CollectAllGarbageIfContextDisposedDeprecated(); |
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 static void NotifyContextDisposedDeprecated(); |
641 | 642 |
642 // Utility to invoke the scavenger. This is needed in test code to | 643 // Utility to invoke the scavenger. This is needed in test code to |
643 // ensure correct callback for weak global handles. | 644 // ensure correct callback for weak global handles. |
644 static void PerformScavenge(); | 645 static void PerformScavenge(); |
645 | 646 |
646 #ifdef DEBUG | 647 #ifdef DEBUG |
647 // Utility used with flag gc-greedy. | 648 // Utility used with flag gc-greedy. |
648 static bool GarbageCollectionGreedyCheck(); | 649 static bool GarbageCollectionGreedyCheck(); |
649 #endif | 650 #endif |
650 | 651 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 static int initial_semispace_size_; | 902 static int initial_semispace_size_; |
902 static int max_old_generation_size_; | 903 static int max_old_generation_size_; |
903 static size_t code_range_size_; | 904 static size_t code_range_size_; |
904 | 905 |
905 // For keeping track of how much data has survived | 906 // For keeping track of how much data has survived |
906 // scavenge since last new space expansion. | 907 // scavenge since last new space expansion. |
907 static int survived_since_last_expansion_; | 908 static int survived_since_last_expansion_; |
908 | 909 |
909 static int always_allocate_scope_depth_; | 910 static int always_allocate_scope_depth_; |
910 static int linear_allocation_scope_depth_; | 911 static int linear_allocation_scope_depth_; |
911 static bool context_disposed_pending_; | 912 |
| 913 // For keeping track of context disposals. |
| 914 static int contexts_disposed_; |
| 915 static bool context_disposed_use_deprecated_heuristic_; |
| 916 static bool context_disposed_deprecated_pending_; |
912 | 917 |
913 #if defined(V8_TARGET_ARCH_X64) | 918 #if defined(V8_TARGET_ARCH_X64) |
914 static const int kMaxObjectSizeInNewSpace = 512*KB; | 919 static const int kMaxObjectSizeInNewSpace = 512*KB; |
915 #else | 920 #else |
916 static const int kMaxObjectSizeInNewSpace = 256*KB; | 921 static const int kMaxObjectSizeInNewSpace = 256*KB; |
917 #endif | 922 #endif |
918 | 923 |
919 static NewSpace new_space_; | 924 static NewSpace new_space_; |
920 static OldSpace* old_pointer_space_; | 925 static OldSpace* old_pointer_space_; |
921 static OldSpace* old_data_space_; | 926 static OldSpace* old_data_space_; |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 | 1699 |
1695 // To speed up scavenge collections new space string are kept | 1700 // To speed up scavenge collections new space string are kept |
1696 // separate from old space strings. | 1701 // separate from old space strings. |
1697 static List<Object*> new_space_strings_; | 1702 static List<Object*> new_space_strings_; |
1698 static List<Object*> old_space_strings_; | 1703 static List<Object*> old_space_strings_; |
1699 }; | 1704 }; |
1700 | 1705 |
1701 } } // namespace v8::internal | 1706 } } // namespace v8::internal |
1702 | 1707 |
1703 #endif // V8_HEAP_H_ | 1708 #endif // V8_HEAP_H_ |
OLD | NEW |