| 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 4546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4557 // We don't do a v->Synchronize call here, because in debug mode that will | 4557 // We don't do a v->Synchronize call here, because in debug mode that will |
| 4558 // output a flag to the snapshot. However at this point the serializer and | 4558 // output a flag to the snapshot. However at this point the serializer and |
| 4559 // deserializer are deliberately a little unsynchronized (see above) so the | 4559 // deserializer are deliberately a little unsynchronized (see above) so the |
| 4560 // checking of the sync flag in the snapshot would fail. | 4560 // checking of the sync flag in the snapshot would fail. |
| 4561 } | 4561 } |
| 4562 | 4562 |
| 4563 | 4563 |
| 4564 // TODO(1236194): Since the heap size is configurable on the command line | 4564 // TODO(1236194): Since the heap size is configurable on the command line |
| 4565 // and through the API, we should gracefully handle the case that the heap | 4565 // and through the API, we should gracefully handle the case that the heap |
| 4566 // size is not big enough to fit all the initial objects. | 4566 // size is not big enough to fit all the initial objects. |
| 4567 bool Heap::ConfigureHeap(intptr_t max_semispace_size, | 4567 bool Heap::ConfigureHeap(int max_semispace_size, |
| 4568 intptr_t max_old_gen_size, | 4568 int max_old_gen_size, |
| 4569 intptr_t max_executable_size) { | 4569 int max_executable_size) { |
| 4570 if (HasBeenSetup()) return false; | 4570 if (HasBeenSetup()) return false; |
| 4571 | 4571 |
| 4572 if (max_semispace_size > 0) { | 4572 if (max_semispace_size > 0) { |
| 4573 if (max_semispace_size < Page::kPageSize) { | 4573 if (max_semispace_size < Page::kPageSize) { |
| 4574 max_semispace_size = Page::kPageSize; | 4574 max_semispace_size = Page::kPageSize; |
| 4575 } | 4575 } |
| 4576 max_semispace_size_ = max_semispace_size; | 4576 max_semispace_size_ = max_semispace_size; |
| 4577 } | 4577 } |
| 4578 | 4578 |
| 4579 if (Snapshot::IsEnabled()) { | 4579 if (Snapshot::IsEnabled()) { |
| (...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5849 } | 5849 } |
| 5850 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 5850 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
| 5851 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 5851 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
| 5852 next = chunk->next_chunk(); | 5852 next = chunk->next_chunk(); |
| 5853 isolate_->memory_allocator()->Free(chunk); | 5853 isolate_->memory_allocator()->Free(chunk); |
| 5854 } | 5854 } |
| 5855 chunks_queued_for_free_ = NULL; | 5855 chunks_queued_for_free_ = NULL; |
| 5856 } | 5856 } |
| 5857 | 5857 |
| 5858 } } // namespace v8::internal | 5858 } } // namespace v8::internal |
| OLD | NEW |