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 4331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4342 // If we are not using snapshots we reserve space for the actual | 4342 // If we are not using snapshots we reserve space for the actual |
4343 // max semispace size. | 4343 // max semispace size. |
4344 reserved_semispace_size_ = max_semispace_size_; | 4344 reserved_semispace_size_ = max_semispace_size_; |
4345 } | 4345 } |
4346 | 4346 |
4347 if (max_old_gen_size > 0) max_old_generation_size_ = max_old_gen_size; | 4347 if (max_old_gen_size > 0) max_old_generation_size_ = max_old_gen_size; |
4348 if (max_executable_size > 0) { | 4348 if (max_executable_size > 0) { |
4349 max_executable_size_ = RoundUp(max_executable_size, Page::kPageSize); | 4349 max_executable_size_ = RoundUp(max_executable_size, Page::kPageSize); |
4350 } | 4350 } |
4351 | 4351 |
| 4352 // The max executable size must be less than or equal to the max old |
| 4353 // generation size. |
| 4354 if (max_executable_size_ > max_old_generation_size_) { |
| 4355 max_executable_size_ = max_old_generation_size_; |
| 4356 } |
| 4357 |
4352 // The new space size must be a power of two to support single-bit testing | 4358 // The new space size must be a power of two to support single-bit testing |
4353 // for containment. | 4359 // for containment. |
4354 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); | 4360 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); |
4355 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); | 4361 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); |
4356 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); | 4362 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); |
4357 external_allocation_limit_ = 10 * max_semispace_size_; | 4363 external_allocation_limit_ = 10 * max_semispace_size_; |
4358 | 4364 |
4359 // The old generation is paged. | 4365 // The old generation is paged. |
4360 max_old_generation_size_ = RoundUp(max_old_generation_size_, Page::kPageSize); | 4366 max_old_generation_size_ = RoundUp(max_old_generation_size_, Page::kPageSize); |
4361 | 4367 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5280 void ExternalStringTable::TearDown() { | 5286 void ExternalStringTable::TearDown() { |
5281 new_space_strings_.Free(); | 5287 new_space_strings_.Free(); |
5282 old_space_strings_.Free(); | 5288 old_space_strings_.Free(); |
5283 } | 5289 } |
5284 | 5290 |
5285 | 5291 |
5286 List<Object*> ExternalStringTable::new_space_strings_; | 5292 List<Object*> ExternalStringTable::new_space_strings_; |
5287 List<Object*> ExternalStringTable::old_space_strings_; | 5293 List<Object*> ExternalStringTable::old_space_strings_; |
5288 | 5294 |
5289 } } // namespace v8::internal | 5295 } } // namespace v8::internal |
OLD | NEW |