Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mark-compact.h

Issue 7639020: Perform TODO(gc) cleanup for TODO-lockdown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // Phase 2: Sweeping to clear mark bits and free non-live objects for 645 // Phase 2: Sweeping to clear mark bits and free non-live objects for
646 // a non-compacting collection. 646 // a non-compacting collection.
647 // 647 //
648 // Before: Live objects are marked and non-live objects are unmarked. 648 // Before: Live objects are marked and non-live objects are unmarked.
649 // 649 //
650 // After: Live objects are unmarked, non-live regions have been added to 650 // After: Live objects are unmarked, non-live regions have been added to
651 // their space's free list. Active eden semispace is compacted by 651 // their space's free list. Active eden semispace is compacted by
652 // evacuation. 652 // evacuation.
653 // 653 //
654 654
655
656 // Iterates live objects in a space, passes live objects
657 // to a callback function which returns the heap size of the object.
658 // Returns the number of live objects iterated.
659 int IterateLiveObjects(NewSpace* space, LiveObjectCallback size_f);
660 int IterateLiveObjects(PagedSpace* space, LiveObjectCallback size_f);
661
662 // Iterates the live objects between a range of addresses, returning the
663 // number of live objects.
664 int IterateLiveObjectsInRange(Address start, Address end,
665 LiveObjectCallback size_func);
666
667 // If we are not compacting the heap, we simply sweep the spaces except 655 // If we are not compacting the heap, we simply sweep the spaces except
668 // for the large object space, clearing mark bits and adding unmarked 656 // for the large object space, clearing mark bits and adding unmarked
669 // regions to each space's free list. 657 // regions to each space's free list.
670 void SweepSpaces(); 658 void SweepSpaces();
671 659
672 void EvacuateNewSpace(); 660 void EvacuateNewSpace();
673 661
674 void EvacuateLiveObjectsFromPage(Page* p); 662 void EvacuateLiveObjectsFromPage(Page* p);
675 663
676 void EvacuatePages(); 664 void EvacuatePages();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 712
725 List<Page*> evacuation_candidates_; 713 List<Page*> evacuation_candidates_;
726 714
727 friend class Heap; 715 friend class Heap;
728 }; 716 };
729 717
730 718
731 } } // namespace v8::internal 719 } } // namespace v8::internal
732 720
733 #endif // V8_MARK_COMPACT_H_ 721 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698