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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 // Performs garbage collection operation. | 637 // Performs garbage collection operation. |
638 // Returns whether required_space bytes are available after the collection. | 638 // Returns whether required_space bytes are available after the collection. |
639 static bool CollectGarbage(int required_space, AllocationSpace space); | 639 static bool CollectGarbage(int required_space, AllocationSpace space); |
640 | 640 |
641 // Performs a full garbage collection. Force compaction if the | 641 // Performs a full garbage collection. Force compaction if the |
642 // parameter is true. | 642 // parameter is true. |
643 static void CollectAllGarbage(bool force_compaction); | 643 static void CollectAllGarbage(bool force_compaction); |
644 | 644 |
645 // Notify the heap that a context has been disposed. | 645 // Notify the heap that a context has been disposed. |
646 static void NotifyContextDisposed(); | 646 static int NotifyContextDisposed() { return ++contexts_disposed_; } |
647 | 647 |
648 // Utility to invoke the scavenger. This is needed in test code to | 648 // Utility to invoke the scavenger. This is needed in test code to |
649 // ensure correct callback for weak global handles. | 649 // ensure correct callback for weak global handles. |
650 static void PerformScavenge(); | 650 static void PerformScavenge(); |
651 | 651 |
652 #ifdef DEBUG | 652 #ifdef DEBUG |
653 // Utility used with flag gc-greedy. | 653 // Utility used with flag gc-greedy. |
654 static bool GarbageCollectionGreedyCheck(); | 654 static bool GarbageCollectionGreedyCheck(); |
655 #endif | 655 #endif |
656 | 656 |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 | 1736 |
1737 // To speed up scavenge collections new space string are kept | 1737 // To speed up scavenge collections new space string are kept |
1738 // separate from old space strings. | 1738 // separate from old space strings. |
1739 static List<Object*> new_space_strings_; | 1739 static List<Object*> new_space_strings_; |
1740 static List<Object*> old_space_strings_; | 1740 static List<Object*> old_space_strings_; |
1741 }; | 1741 }; |
1742 | 1742 |
1743 } } // namespace v8::internal | 1743 } } // namespace v8::internal |
1744 | 1744 |
1745 #endif // V8_HEAP_H_ | 1745 #endif // V8_HEAP_H_ |
OLD | NEW |