Chromium Code Reviews| Index: src/heap.cc |
| =================================================================== |
| --- src/heap.cc (revision 8132) |
| +++ src/heap.cc (working copy) |
| @@ -152,6 +152,15 @@ |
| max_semispace_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE; |
| #endif |
| + intptr_t max_virtual = OS::MaxVirtualMemory(); |
| + |
| + if (max_virtual > 0) { |
| + if (code_range_size_ > 0) { |
|
Kasper Lund
2011/06/01 08:23:49
It would be nice with a comment here that explains
|
| + code_range_size_ = Min(code_range_size_, max_virtual >> 2); |
| + } |
| + max_old_generation_size_ = Min(max_old_generation_size_, max_virtual >> 1); |
| + } |
| + |
| memset(roots_, 0, sizeof(roots_[0]) * kRootListLength); |
| global_contexts_list_ = NULL; |
| mark_compact_collector_.heap_ = this; |