OLD | NEW |
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/full-codegen.h" | 7 #include "src/full-codegen.h" |
8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 #include "src/mark-compact.h" | 9 #include "src/mark-compact.h" |
10 #include "src/msan.h" | 10 #include "src/msan.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 free_list_.Clear(); | 187 free_list_.Clear(); |
188 | 188 |
189 for (current_allocation_block_index_ = 0; | 189 for (current_allocation_block_index_ = 0; |
190 current_allocation_block_index_ < allocation_list_.length(); | 190 current_allocation_block_index_ < allocation_list_.length(); |
191 current_allocation_block_index_++) { | 191 current_allocation_block_index_++) { |
192 if (requested <= allocation_list_[current_allocation_block_index_].size) { | 192 if (requested <= allocation_list_[current_allocation_block_index_].size) { |
193 return true; // Found a large enough allocation block. | 193 return true; // Found a large enough allocation block. |
194 } | 194 } |
195 } | 195 } |
196 | 196 current_allocation_block_index_ = 0; |
197 // Code range is full or too fragmented. | 197 // Code range is full or too fragmented. |
198 return false; | 198 return false; |
199 } | 199 } |
200 | 200 |
201 | 201 |
202 Address CodeRange::AllocateRawMemory(const size_t requested_size, | 202 Address CodeRange::AllocateRawMemory(const size_t requested_size, |
203 const size_t commit_size, | 203 const size_t commit_size, |
204 size_t* allocated) { | 204 size_t* allocated) { |
205 ASSERT(commit_size <= requested_size); | 205 ASSERT(commit_size <= requested_size); |
206 ASSERT(current_allocation_block_index_ < allocation_list_.length()); | 206 ASSERT(current_allocation_block_index_ < allocation_list_.length()); |
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3125 object->ShortPrint(); | 3125 object->ShortPrint(); |
3126 PrintF("\n"); | 3126 PrintF("\n"); |
3127 } | 3127 } |
3128 printf(" --------------------------------------\n"); | 3128 printf(" --------------------------------------\n"); |
3129 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3129 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3130 } | 3130 } |
3131 | 3131 |
3132 #endif // DEBUG | 3132 #endif // DEBUG |
3133 | 3133 |
3134 } } // namespace v8::internal | 3134 } } // namespace v8::internal |
OLD | NEW |