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

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

Issue 845963004: Version 3.30.33.15 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@3.30
Patch Set: 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 | src/version.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 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 object->ShortPrint(); 3205 object->ShortPrint();
3205 PrintF("\n"); 3206 PrintF("\n");
3206 } 3207 }
3207 printf(" --------------------------------------\n"); 3208 printf(" --------------------------------------\n");
3208 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3209 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3209 } 3210 }
3210 3211
3211 #endif // DEBUG 3212 #endif // DEBUG
3212 } 3213 }
3213 } // namespace v8::internal 3214 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698