OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/heap.h" | 5 #include "vm/heap.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/compiler_stats.h" | 9 #include "vm/compiler_stats.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 PrintSizes(); | 219 PrintSizes(); |
220 } | 220 } |
221 } | 221 } |
222 | 222 |
223 | 223 |
224 void Heap::EnableGrowthControl() { | 224 void Heap::EnableGrowthControl() { |
225 old_space_->EnableGrowthControl(); | 225 old_space_->EnableGrowthControl(); |
226 } | 226 } |
227 | 227 |
228 | 228 |
229 void Heap::Protect(VirtualMemory::Protection mode) { | |
230 new_space_->Protect(mode); | |
231 old_space_->Protect(mode); | |
232 code_space_->Protect(mode); | |
siva
2012/07/27 01:55:00
This seems weird here as we independently set the
Ivan Posva
2012/07/27 18:02:56
Done.
| |
233 } | |
234 | |
235 | |
229 uword Heap::TopAddress() { | 236 uword Heap::TopAddress() { |
230 return reinterpret_cast<uword>(new_space_->TopAddress()); | 237 return reinterpret_cast<uword>(new_space_->TopAddress()); |
231 } | 238 } |
232 | 239 |
233 | 240 |
234 uword Heap::EndAddress() { | 241 uword Heap::EndAddress() { |
235 return reinterpret_cast<uword>(new_space_->EndAddress()); | 242 return reinterpret_cast<uword>(new_space_->EndAddress()); |
236 } | 243 } |
237 | 244 |
238 | 245 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 isolate()->IncrementNoGCScopeDepth(); | 336 isolate()->IncrementNoGCScopeDepth(); |
330 } | 337 } |
331 | 338 |
332 | 339 |
333 NoGCScope::~NoGCScope() { | 340 NoGCScope::~NoGCScope() { |
334 isolate()->DecrementNoGCScopeDepth(); | 341 isolate()->DecrementNoGCScopeDepth(); |
335 } | 342 } |
336 #endif // defined(DEBUG) | 343 #endif // defined(DEBUG) |
337 | 344 |
338 } // namespace dart | 345 } // namespace dart |
OLD | NEW |