OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 bool success = marking_deque_memory_->Commit( | 446 bool success = marking_deque_memory_->Commit( |
447 reinterpret_cast<Address>(marking_deque_memory_->address()), | 447 reinterpret_cast<Address>(marking_deque_memory_->address()), |
448 marking_deque_memory_->size(), | 448 marking_deque_memory_->size(), |
449 false); // Not executable. | 449 false); // Not executable. |
450 CHECK(success); | 450 CHECK(success); |
451 marking_deque_memory_committed_ = true; | 451 marking_deque_memory_committed_ = true; |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 void IncrementalMarking::UncommitMarkingDeque() { | 455 void IncrementalMarking::UncommitMarkingDeque() { |
456 ASSERT(state_ == STOPPED); | 456 if (state_ == STOPPED && marking_deque_memory_committed_) { |
457 if (marking_deque_memory_committed_) { | |
458 bool success = marking_deque_memory_->Uncommit( | 457 bool success = marking_deque_memory_->Uncommit( |
459 reinterpret_cast<Address>(marking_deque_memory_->address()), | 458 reinterpret_cast<Address>(marking_deque_memory_->address()), |
460 marking_deque_memory_->size()); | 459 marking_deque_memory_->size()); |
461 CHECK(success); | 460 CHECK(success); |
462 marking_deque_memory_committed_ = false; | 461 marking_deque_memory_committed_ = false; |
463 } | 462 } |
464 } | 463 } |
465 | 464 |
466 | 465 |
467 void IncrementalMarking::Start() { | 466 void IncrementalMarking::Start() { |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 910 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
912 bytes_scanned_ = 0; | 911 bytes_scanned_ = 0; |
913 } | 912 } |
914 | 913 |
915 | 914 |
916 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 915 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
917 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 916 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
918 } | 917 } |
919 | 918 |
920 } } // namespace v8::internal | 919 } } // namespace v8::internal |
OLD | NEW |