OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 #endif | 62 #endif |
63 | 63 |
64 namespace v8 { | 64 namespace v8 { |
65 namespace internal { | 65 namespace internal { |
66 | 66 |
67 | 67 |
68 Heap::Heap() | 68 Heap::Heap() |
69 : isolate_(NULL), | 69 : isolate_(NULL), |
70 // semispace_size_ should be a power of 2 and old_generation_size_ should be | 70 // semispace_size_ should be a power of 2 and old_generation_size_ should be |
71 // a multiple of Page::kPageSize. | 71 // a multiple of Page::kPageSize. |
72 #if V8_TARGET_ARCH_X64 | 72 #if V8_TARGET_ARCH_X64 |
Hannes Payer (out of office)
2013/09/24 07:31:00
Let's get rid of this ifdef as well and use kPoint
rmcilroy
2013/09/24 10:50:55
Done.
| |
73 #define LUMP_OF_MEMORY (2 * MB) | 73 #define LUMP_OF_MEMORY (2 * MB) |
74 code_range_size_(512*MB), | 74 code_range_size_(512*MB), |
Hannes Payer (out of office)
2013/09/24 07:31:00
Can we specify that in ConfigureResourceConstraint
rmcilroy
2013/09/24 10:50:55
ResourceConstraints doesn't have an option for set
Hannes Payer (out of office)
2013/09/24 11:27:16
I like it how you handle it in your new cl.
| |
75 #else | 75 #else |
76 #define LUMP_OF_MEMORY MB | 76 #define LUMP_OF_MEMORY MB |
77 code_range_size_(0), | 77 code_range_size_(0), |
78 #endif | 78 #endif |
79 #if defined(ANDROID) || V8_TARGET_ARCH_MIPS | |
80 reserved_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)), | |
81 max_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)), | |
82 initial_semispace_size_(Page::kPageSize), | |
83 max_old_generation_size_(192*MB), | |
84 max_executable_size_(max_old_generation_size_), | |
85 #else | |
86 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), | 79 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), |
87 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), | 80 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), |
88 initial_semispace_size_(Page::kPageSize), | 81 initial_semispace_size_(Page::kPageSize), |
89 max_old_generation_size_(700ul * LUMP_OF_MEMORY), | 82 max_old_generation_size_(700ul * LUMP_OF_MEMORY), |
90 max_executable_size_(256l * LUMP_OF_MEMORY), | 83 max_executable_size_(256l * LUMP_OF_MEMORY), |
Hannes Payer (out of office)
2013/09/24 07:31:00
indent
rmcilroy
2013/09/24 10:50:55
I'm not sure what you want indented here? The para
Hannes Payer (out of office)
2013/09/24 11:27:16
ups, looked strange on codereview, but it is corre
| |
91 #endif | |
92 | |
93 // Variables set based on semispace_size_ and old_generation_size_ in | 84 // Variables set based on semispace_size_ and old_generation_size_ in |
94 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) | 85 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) |
95 // Will be 4 * reserved_semispace_size_ to ensure that young | 86 // Will be 4 * reserved_semispace_size_ to ensure that young |
96 // generation can be aligned to its size. | 87 // generation can be aligned to its size. |
97 survived_since_last_expansion_(0), | 88 survived_since_last_expansion_(0), |
98 sweep_generation_(0), | 89 sweep_generation_(0), |
99 always_allocate_scope_depth_(0), | 90 always_allocate_scope_depth_(0), |
100 linear_allocation_scope_depth_(0), | 91 linear_allocation_scope_depth_(0), |
101 contexts_disposed_(0), | 92 contexts_disposed_(0), |
102 global_ic_age_(0), | 93 global_ic_age_(0), |
(...skipping 7982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8085 if (FLAG_concurrent_recompilation) { | 8076 if (FLAG_concurrent_recompilation) { |
8086 heap_->relocation_mutex_->Lock(); | 8077 heap_->relocation_mutex_->Lock(); |
8087 #ifdef DEBUG | 8078 #ifdef DEBUG |
8088 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8079 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8089 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8080 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8090 #endif // DEBUG | 8081 #endif // DEBUG |
8091 } | 8082 } |
8092 } | 8083 } |
8093 | 8084 |
8094 } } // namespace v8::internal | 8085 } } // namespace v8::internal |
OLD | NEW |