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

Side by Side Diff: src/spaces.h

Issue 6588007: Flush watermarks after compacting map space on mark-sweep collection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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
« no previous file with comments | « no previous file | 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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 Page* top_page = Page::FromAddress(new_top); 2114 Page* top_page = Page::FromAddress(new_top);
2115 ASSERT(top_page->is_valid()); 2115 ASSERT(top_page->is_valid());
2116 2116
2117 SetAllocationInfo(&allocation_info_, top_page); 2117 SetAllocationInfo(&allocation_info_, top_page);
2118 allocation_info_.top = new_top; 2118 allocation_info_.top = new_top;
2119 2119
2120 int new_size = live_maps * Map::kSize; 2120 int new_size = live_maps * Map::kSize;
2121 accounting_stats_.DeallocateBytes(accounting_stats_.Size()); 2121 accounting_stats_.DeallocateBytes(accounting_stats_.Size());
2122 accounting_stats_.AllocateBytes(new_size); 2122 accounting_stats_.AllocateBytes(new_size);
2123 2123
2124 // Flush allocation watermarks.
2125 for (Page* p = first_page_; p != top_page; p = p->next_page()) {
2126 p->SetAllocationWatermark(p->AllocationTop());
2127 }
2128 top_page->SetAllocationWatermark(new_top);
2129
2124 #ifdef DEBUG 2130 #ifdef DEBUG
2125 if (FLAG_enable_slow_asserts) { 2131 if (FLAG_enable_slow_asserts) {
2126 intptr_t actual_size = 0; 2132 intptr_t actual_size = 0;
2127 for (Page* p = first_page_; p != top_page; p = p->next_page()) 2133 for (Page* p = first_page_; p != top_page; p = p->next_page())
2128 actual_size += kMapsPerPage * Map::kSize; 2134 actual_size += kMapsPerPage * Map::kSize;
2129 actual_size += (new_top - top_page->ObjectAreaStart()); 2135 actual_size += (new_top - top_page->ObjectAreaStart());
2130 ASSERT(accounting_stats_.Size() == actual_size); 2136 ASSERT(accounting_stats_.Size() == actual_size);
2131 } 2137 }
2132 #endif 2138 #endif
2133 2139
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 2353
2348 private: 2354 private:
2349 LargeObjectChunk* current_; 2355 LargeObjectChunk* current_;
2350 HeapObjectCallback size_func_; 2356 HeapObjectCallback size_func_;
2351 }; 2357 };
2352 2358
2353 2359
2354 } } // namespace v8::internal 2360 } } // namespace v8::internal
2355 2361
2356 #endif // V8_SPACES_H_ 2362 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698