| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4790 | 4790 |
| 4791 // The new space size must be a power of two to support single-bit testing | 4791 // The new space size must be a power of two to support single-bit testing |
| 4792 // for containment. | 4792 // for containment. |
| 4793 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); | 4793 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); |
| 4794 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); | 4794 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); |
| 4795 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); | 4795 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); |
| 4796 external_allocation_limit_ = 10 * max_semispace_size_; | 4796 external_allocation_limit_ = 10 * max_semispace_size_; |
| 4797 | 4797 |
| 4798 // The old generation is paged and needs at least one page for each space. | 4798 // The old generation is paged and needs at least one page for each space. |
| 4799 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; | 4799 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; |
| 4800 max_old_generation_size_ = Max(paged_space_count * Page::kPageSize, | 4800 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * |
| 4801 Page::kPageSize), |
| 4801 RoundUp(max_old_generation_size_, | 4802 RoundUp(max_old_generation_size_, |
| 4802 Page::kPageSize)); | 4803 Page::kPageSize)); |
| 4803 | 4804 |
| 4804 configured_ = true; | 4805 configured_ = true; |
| 4805 return true; | 4806 return true; |
| 4806 } | 4807 } |
| 4807 | 4808 |
| 4808 | 4809 |
| 4809 bool Heap::ConfigureHeapDefault() { | 4810 bool Heap::ConfigureHeapDefault() { |
| 4810 return ConfigureHeap(static_cast<intptr_t>(FLAG_max_new_space_size / 2) * KB, | 4811 return ConfigureHeap(static_cast<intptr_t>(FLAG_max_new_space_size / 2) * KB, |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6075 } | 6076 } |
| 6076 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 6077 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
| 6077 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 6078 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
| 6078 next = chunk->next_chunk(); | 6079 next = chunk->next_chunk(); |
| 6079 isolate_->memory_allocator()->Free(chunk); | 6080 isolate_->memory_allocator()->Free(chunk); |
| 6080 } | 6081 } |
| 6081 chunks_queued_for_free_ = NULL; | 6082 chunks_queued_for_free_ = NULL; |
| 6082 } | 6083 } |
| 6083 | 6084 |
| 6084 } } // namespace v8::internal | 6085 } } // namespace v8::internal |
| OLD | NEW |