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/spaces.cc

Issue 8997004: Do not delay sweeping of pages that are completely free. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 it.next(); 745 it.next();
746 count++; 746 count++;
747 } 747 }
748 return count; 748 return count;
749 } 749 }
750 750
751 751
752 void PagedSpace::ReleasePage(Page* page) { 752 void PagedSpace::ReleasePage(Page* page) {
753 ASSERT(page->LiveBytes() == 0); 753 ASSERT(page->LiveBytes() == 0);
754 754
755 // Adjust list of unswept pages if the page is it's head or tail. 755 // Adjust list of unswept pages if the page is it's head.
Erik Corry 2011/12/19 11:23:58 it's ->its. Actually "if the page is the head of
756 if (first_unswept_page_ == page) { 756 if (first_unswept_page_ == page) {
757 first_unswept_page_ = page->next_page(); 757 first_unswept_page_ = page->next_page();
758 if (first_unswept_page_ == anchor()) { 758 if (first_unswept_page_ == anchor()) {
759 first_unswept_page_ = Page::FromAddress(NULL); 759 first_unswept_page_ = Page::FromAddress(NULL);
760 } 760 }
761 } 761 }
762 762
763 if (page->WasSwept()) { 763 if (page->WasSwept()) {
764 intptr_t size = free_list_.EvictFreeListItems(page); 764 intptr_t size = free_list_.EvictFreeListItems(page);
765 accounting_stats_.AllocateBytes(size); 765 accounting_stats_.AllocateBytes(size);
(...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 object->ShortPrint(); 2653 object->ShortPrint();
2654 PrintF("\n"); 2654 PrintF("\n");
2655 } 2655 }
2656 printf(" --------------------------------------\n"); 2656 printf(" --------------------------------------\n");
2657 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2657 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2658 } 2658 }
2659 2659
2660 #endif // DEBUG 2660 #endif // DEBUG
2661 2661
2662 } } // namespace v8::internal 2662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698