| 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 // Performs garbage collection operation. | 628 // Performs garbage collection operation. |
| 629 // Returns whether required_space bytes are available after the collection. | 629 // Returns whether required_space bytes are available after the collection. |
| 630 static bool CollectGarbage(int required_space, AllocationSpace space); | 630 static bool CollectGarbage(int required_space, AllocationSpace space); |
| 631 | 631 |
| 632 // Performs a full garbage collection. Force compaction if the | 632 // Performs a full garbage collection. Force compaction if the |
| 633 // parameter is true. | 633 // parameter is true. |
| 634 static void CollectAllGarbage(bool force_compaction); | 634 static void CollectAllGarbage(bool force_compaction); |
| 635 | 635 |
| 636 // Performs a full garbage collection if a context has been disposed | 636 // Performs a full garbage collection if a context has been disposed |
| 637 // since the last time the check was performed. | 637 // since the last time the check was performed. |
| 638 static void CollectAllGarbageIfContextDisposed(bool notified); | 638 static void CollectAllGarbageIfContextDisposedDeprecated(); |
| 639 | 639 |
| 640 // Notify the heap that a context has been disposed. | 640 // Notify the heap that a context has been disposed. |
| 641 static void NotifyContextDisposed(); | 641 static void NotifyContextDisposed(); |
| 642 static void NotifyContextDisposedDeprecated(); |
| 642 | 643 |
| 643 // Utility to invoke the scavenger. This is needed in test code to | 644 // Utility to invoke the scavenger. This is needed in test code to |
| 644 // ensure correct callback for weak global handles. | 645 // ensure correct callback for weak global handles. |
| 645 static void PerformScavenge(); | 646 static void PerformScavenge(); |
| 646 | 647 |
| 647 #ifdef DEBUG | 648 #ifdef DEBUG |
| 648 // Utility used with flag gc-greedy. | 649 // Utility used with flag gc-greedy. |
| 649 static bool GarbageCollectionGreedyCheck(); | 650 static bool GarbageCollectionGreedyCheck(); |
| 650 #endif | 651 #endif |
| 651 | 652 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 static int initial_semispace_size_; | 903 static int initial_semispace_size_; |
| 903 static int max_old_generation_size_; | 904 static int max_old_generation_size_; |
| 904 static size_t code_range_size_; | 905 static size_t code_range_size_; |
| 905 | 906 |
| 906 // For keeping track of how much data has survived | 907 // For keeping track of how much data has survived |
| 907 // scavenge since last new space expansion. | 908 // scavenge since last new space expansion. |
| 908 static int survived_since_last_expansion_; | 909 static int survived_since_last_expansion_; |
| 909 | 910 |
| 910 static int always_allocate_scope_depth_; | 911 static int always_allocate_scope_depth_; |
| 911 static int linear_allocation_scope_depth_; | 912 static int linear_allocation_scope_depth_; |
| 912 static bool context_disposed_pending_; | 913 |
| 914 // For keeping track of context disposals. |
| 915 static int contexts_disposed_; |
| 916 static bool context_disposed_use_deprecated_heuristic_; |
| 917 static bool context_disposed_deprecated_pending_; |
| 913 | 918 |
| 914 #if defined(V8_TARGET_ARCH_X64) | 919 #if defined(V8_TARGET_ARCH_X64) |
| 915 static const int kMaxObjectSizeInNewSpace = 512*KB; | 920 static const int kMaxObjectSizeInNewSpace = 512*KB; |
| 916 #else | 921 #else |
| 917 static const int kMaxObjectSizeInNewSpace = 256*KB; | 922 static const int kMaxObjectSizeInNewSpace = 256*KB; |
| 918 #endif | 923 #endif |
| 919 | 924 |
| 920 static NewSpace new_space_; | 925 static NewSpace new_space_; |
| 921 static OldSpace* old_pointer_space_; | 926 static OldSpace* old_pointer_space_; |
| 922 static OldSpace* old_data_space_; | 927 static OldSpace* old_data_space_; |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 | 1731 |
| 1727 // To speed up scavenge collections new space string are kept | 1732 // To speed up scavenge collections new space string are kept |
| 1728 // separate from old space strings. | 1733 // separate from old space strings. |
| 1729 static List<Object*> new_space_strings_; | 1734 static List<Object*> new_space_strings_; |
| 1730 static List<Object*> old_space_strings_; | 1735 static List<Object*> old_space_strings_; |
| 1731 }; | 1736 }; |
| 1732 | 1737 |
| 1733 } } // namespace v8::internal | 1738 } } // namespace v8::internal |
| 1734 | 1739 |
| 1735 #endif // V8_HEAP_H_ | 1740 #endif // V8_HEAP_H_ |
| OLD | NEW |