| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "full-codegen.h" | 7 #include "full-codegen.h" |
| 8 #include "macro-assembler.h" | 8 #include "macro-assembler.h" |
| 9 #include "mark-compact.h" | 9 #include "mark-compact.h" |
| 10 #include "msan.h" | 10 #include "msan.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 free_list_.Clear(); | 185 free_list_.Clear(); |
| 186 | 186 |
| 187 for (current_allocation_block_index_ = 0; | 187 for (current_allocation_block_index_ = 0; |
| 188 current_allocation_block_index_ < allocation_list_.length(); | 188 current_allocation_block_index_ < allocation_list_.length(); |
| 189 current_allocation_block_index_++) { | 189 current_allocation_block_index_++) { |
| 190 if (requested <= allocation_list_[current_allocation_block_index_].size) { | 190 if (requested <= allocation_list_[current_allocation_block_index_].size) { |
| 191 return true; // Found a large enough allocation block. | 191 return true; // Found a large enough allocation block. |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 current_allocation_block_index_ = 0; |
| 195 // Code range is full or too fragmented. | 195 // Code range is full or too fragmented. |
| 196 return false; | 196 return false; |
| 197 } | 197 } |
| 198 | 198 |
| 199 | 199 |
| 200 Address CodeRange::AllocateRawMemory(const size_t requested_size, | 200 Address CodeRange::AllocateRawMemory(const size_t requested_size, |
| 201 const size_t commit_size, | 201 const size_t commit_size, |
| 202 size_t* allocated) { | 202 size_t* allocated) { |
| 203 ASSERT(commit_size <= requested_size); | 203 ASSERT(commit_size <= requested_size); |
| 204 ASSERT(current_allocation_block_index_ < allocation_list_.length()); | 204 ASSERT(current_allocation_block_index_ < allocation_list_.length()); |
| (...skipping 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3111 object->ShortPrint(); | 3111 object->ShortPrint(); |
| 3112 PrintF("\n"); | 3112 PrintF("\n"); |
| 3113 } | 3113 } |
| 3114 printf(" --------------------------------------\n"); | 3114 printf(" --------------------------------------\n"); |
| 3115 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3115 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3116 } | 3116 } |
| 3117 | 3117 |
| 3118 #endif // DEBUG | 3118 #endif // DEBUG |
| 3119 | 3119 |
| 3120 } } // namespace v8::internal | 3120 } } // namespace v8::internal |
| OLD | NEW |