| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_SPACES_H_ | 5 #ifndef V8_SPACES_H_ |
| 6 #define V8_SPACES_H_ | 6 #define V8_SPACES_H_ |
| 7 | 7 |
| 8 #include "allocation.h" | 8 #include "allocation.h" |
| 9 #include "hashmap.h" | 9 #include "hashmap.h" |
| 10 #include "list.h" | 10 #include "list.h" |
| (...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 public: | 2410 public: |
| 2411 // Constructor. | 2411 // Constructor. |
| 2412 explicit NewSpace(Heap* heap) | 2412 explicit NewSpace(Heap* heap) |
| 2413 : Space(heap, NEW_SPACE, NOT_EXECUTABLE), | 2413 : Space(heap, NEW_SPACE, NOT_EXECUTABLE), |
| 2414 to_space_(heap, kToSpace), | 2414 to_space_(heap, kToSpace), |
| 2415 from_space_(heap, kFromSpace), | 2415 from_space_(heap, kFromSpace), |
| 2416 reservation_(), | 2416 reservation_(), |
| 2417 inline_allocation_limit_step_(0) {} | 2417 inline_allocation_limit_step_(0) {} |
| 2418 | 2418 |
| 2419 // Sets up the new space using the given chunk. | 2419 // Sets up the new space using the given chunk. |
| 2420 bool SetUp(int reserved_semispace_size_, int max_semispace_size); | 2420 bool SetUp(int reserved_semispace_size_, int max_semi_space_size); |
| 2421 | 2421 |
| 2422 // Tears down the space. Heap memory was not allocated by the space, so it | 2422 // Tears down the space. Heap memory was not allocated by the space, so it |
| 2423 // is not deallocated here. | 2423 // is not deallocated here. |
| 2424 void TearDown(); | 2424 void TearDown(); |
| 2425 | 2425 |
| 2426 // True if the space has been set up but not torn down. | 2426 // True if the space has been set up but not torn down. |
| 2427 bool HasBeenSetUp() { | 2427 bool HasBeenSetUp() { |
| 2428 return to_space_.HasBeenSetUp() && from_space_.HasBeenSetUp(); | 2428 return to_space_.HasBeenSetUp() && from_space_.HasBeenSetUp(); |
| 2429 } | 2429 } |
| 2430 | 2430 |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2996 } | 2996 } |
| 2997 // Must be small, since an iteration is used for lookup. | 2997 // Must be small, since an iteration is used for lookup. |
| 2998 static const int kMaxComments = 64; | 2998 static const int kMaxComments = 64; |
| 2999 }; | 2999 }; |
| 3000 #endif | 3000 #endif |
| 3001 | 3001 |
| 3002 | 3002 |
| 3003 } } // namespace v8::internal | 3003 } } // namespace v8::internal |
| 3004 | 3004 |
| 3005 #endif // V8_SPACES_H_ | 3005 #endif // V8_SPACES_H_ |
| OLD | NEW |