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

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

Issue 380263002: Fix windows compile, again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « src/mark-compact.h ('k') | src/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compilation-cache.h" 9 #include "src/compilation-cache.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 4050 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 static_cast<int>(p->area_end() - free_start)); 4061 static_cast<int>(p->area_end() - free_start));
4062 max_freed_bytes = Max(freed_bytes, max_freed_bytes); 4062 max_freed_bytes = Max(freed_bytes, max_freed_bytes);
4063 } 4063 }
4064 4064
4065 p->ResetLiveBytes(); 4065 p->ResetLiveBytes();
4066 return max_freed_bytes; 4066 return max_freed_bytes;
4067 } 4067 }
4068 4068
4069 4069
4070 int MarkCompactCollector::SweepInParallel(PagedSpace* space, 4070 int MarkCompactCollector::SweepInParallel(PagedSpace* space,
4071 intptr_t required_freed_bytes) { 4071 int required_freed_bytes) {
4072 PageIterator it(space); 4072 PageIterator it(space);
4073 FreeList* free_list = space == heap()->old_pointer_space() 4073 FreeList* free_list = space == heap()->old_pointer_space()
4074 ? free_list_old_pointer_space_.get() 4074 ? free_list_old_pointer_space_.get()
4075 : free_list_old_data_space_.get(); 4075 : free_list_old_data_space_.get();
4076 FreeList private_free_list(space); 4076 FreeList private_free_list(space);
4077 intptr_t max_freed = 0; 4077 int max_freed = 0;
4078 intptr_t max_freed_overall = 0; 4078 int max_freed_overall = 0;
4079 while (it.has_next()) { 4079 while (it.has_next()) {
4080 Page* p = it.next(); 4080 Page* p = it.next();
4081 4081
4082 if (p->TryParallelSweeping()) { 4082 if (p->TryParallelSweeping()) {
4083 max_freed = SweepConservatively<SWEEP_IN_PARALLEL>( 4083 max_freed = static_cast<int>(SweepConservatively<SWEEP_IN_PARALLEL>(
Dmitry Lomov (no reviews) 2014/07/10 17:06:54 Please ASSERT no overflow
Hannes Payer (out of office) 2014/07/10 17:13:11 Done.
4084 space, &private_free_list, p); 4084 space, &private_free_list, p));
4085 free_list->Concatenate(&private_free_list); 4085 free_list->Concatenate(&private_free_list);
4086 if (required_freed_bytes > 0 && max_freed >= required_freed_bytes) { 4086 if (required_freed_bytes > 0 && max_freed >= required_freed_bytes) {
4087 return max_freed; 4087 return max_freed;
4088 } 4088 }
4089 max_freed_overall = Max(max_freed, max_freed_overall); 4089 max_freed_overall = Max(max_freed, max_freed_overall);
4090 } 4090 }
4091 if (p == space->end_of_unswept_pages()) break; 4091 if (p == space->end_of_unswept_pages()) break;
4092 } 4092 }
4093 return max_freed_overall; 4093 return max_freed_overall;
4094 } 4094 }
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
4505 while (buffer != NULL) { 4505 while (buffer != NULL) {
4506 SlotsBuffer* next_buffer = buffer->next(); 4506 SlotsBuffer* next_buffer = buffer->next();
4507 DeallocateBuffer(buffer); 4507 DeallocateBuffer(buffer);
4508 buffer = next_buffer; 4508 buffer = next_buffer;
4509 } 4509 }
4510 *buffer_address = NULL; 4510 *buffer_address = NULL;
4511 } 4511 }
4512 4512
4513 4513
4514 } } // namespace v8::internal 4514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698