| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4470 } | 4470 } |
| 4471 | 4471 |
| 4472 | 4472 |
| 4473 // Flag is set when the heap has been configured. The heap can be repeatedly | 4473 // Flag is set when the heap has been configured. The heap can be repeatedly |
| 4474 // configured through the API until it is setup. | 4474 // configured through the API until it is setup. |
| 4475 static bool heap_configured = false; | 4475 static bool heap_configured = false; |
| 4476 | 4476 |
| 4477 // TODO(1236194): Since the heap size is configurable on the command line | 4477 // TODO(1236194): Since the heap size is configurable on the command line |
| 4478 // and through the API, we should gracefully handle the case that the heap | 4478 // and through the API, we should gracefully handle the case that the heap |
| 4479 // size is not big enough to fit all the initial objects. | 4479 // size is not big enough to fit all the initial objects. |
| 4480 bool Heap::ConfigureHeap(intptr_t max_semispace_size, | 4480 bool Heap::ConfigureHeap(int max_semispace_size, |
| 4481 intptr_t max_old_gen_size, | 4481 int max_old_gen_size, |
| 4482 intptr_t max_executable_size) { | 4482 int max_executable_size) { |
| 4483 if (HasBeenSetup()) return false; | 4483 if (HasBeenSetup()) return false; |
| 4484 | 4484 |
| 4485 if (max_semispace_size > 0) max_semispace_size_ = max_semispace_size; | 4485 if (max_semispace_size > 0) max_semispace_size_ = max_semispace_size; |
| 4486 | 4486 |
| 4487 if (Snapshot::IsEnabled()) { | 4487 if (Snapshot::IsEnabled()) { |
| 4488 // If we are using a snapshot we always reserve the default amount | 4488 // If we are using a snapshot we always reserve the default amount |
| 4489 // of memory for each semispace because code in the snapshot has | 4489 // of memory for each semispace because code in the snapshot has |
| 4490 // write-barrier code that relies on the size and alignment of new | 4490 // write-barrier code that relies on the size and alignment of new |
| 4491 // space. We therefore cannot use a larger max semispace size | 4491 // space. We therefore cannot use a larger max semispace size |
| 4492 // than the default reserved semispace size. | 4492 // than the default reserved semispace size. |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5584 void ExternalStringTable::TearDown() { | 5584 void ExternalStringTable::TearDown() { |
| 5585 new_space_strings_.Free(); | 5585 new_space_strings_.Free(); |
| 5586 old_space_strings_.Free(); | 5586 old_space_strings_.Free(); |
| 5587 } | 5587 } |
| 5588 | 5588 |
| 5589 | 5589 |
| 5590 List<Object*> ExternalStringTable::new_space_strings_; | 5590 List<Object*> ExternalStringTable::new_space_strings_; |
| 5591 List<Object*> ExternalStringTable::old_space_strings_; | 5591 List<Object*> ExternalStringTable::old_space_strings_; |
| 5592 | 5592 |
| 5593 } } // namespace v8::internal | 5593 } } // namespace v8::internal |
| OLD | NEW |