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

Side by Side Diff: src/heap/spaces.cc

Issue 843973002: Correctly setup the freelist of the coderange on Win64 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 11 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
« no previous file with comments | « no previous file | test/cctest/test-alloc.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 if (kReservedCodeRangePages) { 133 if (kReservedCodeRangePages) {
134 if (!code_range_->Commit( 134 if (!code_range_->Commit(
135 base, kReservedCodeRangePages * base::OS::CommitPageSize(), true)) { 135 base, kReservedCodeRangePages * base::OS::CommitPageSize(), true)) {
136 delete code_range_; 136 delete code_range_;
137 code_range_ = NULL; 137 code_range_ = NULL;
138 return false; 138 return false;
139 } 139 }
140 base += kReservedCodeRangePages * base::OS::CommitPageSize(); 140 base += kReservedCodeRangePages * base::OS::CommitPageSize();
141 } 141 }
142 Address aligned_base = RoundUp(base, MemoryChunk::kAlignment); 142 Address aligned_base = RoundUp(base, MemoryChunk::kAlignment);
143 size_t size = code_range_->size() - (aligned_base - base); 143 size_t size = code_range_->size() - (aligned_base - base) -
144 kReservedCodeRangePages * base::OS::CommitPageSize();
144 allocation_list_.Add(FreeBlock(aligned_base, size)); 145 allocation_list_.Add(FreeBlock(aligned_base, size));
145 current_allocation_block_index_ = 0; 146 current_allocation_block_index_ = 0;
146 147
147 LOG(isolate_, NewEvent("CodeRange", code_range_->address(), requested)); 148 LOG(isolate_, NewEvent("CodeRange", code_range_->address(), requested));
148 ReserveEmergencyBlock(); 149 ReserveEmergencyBlock();
149 return true; 150 return true;
150 } 151 }
151 152
152 153
153 int CodeRange::CompareFreeBlockAddress(const FreeBlock* left, 154 int CodeRange::CompareFreeBlockAddress(const FreeBlock* left,
(...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 object->ShortPrint(); 3224 object->ShortPrint();
3224 PrintF("\n"); 3225 PrintF("\n");
3225 } 3226 }
3226 printf(" --------------------------------------\n"); 3227 printf(" --------------------------------------\n");
3227 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3228 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3228 } 3229 }
3229 3230
3230 #endif // DEBUG 3231 #endif // DEBUG
3231 } 3232 }
3232 } // namespace v8::internal 3233 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698