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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 551 |
552 | 552 |
553 void IncrementalMarking::EnsureMarkingDequeIsCommitted() { | 553 void IncrementalMarking::EnsureMarkingDequeIsCommitted() { |
554 if (marking_deque_memory_ == NULL) { | 554 if (marking_deque_memory_ == NULL) { |
555 marking_deque_memory_ = new VirtualMemory(4 * MB); | 555 marking_deque_memory_ = new VirtualMemory(4 * MB); |
556 } | 556 } |
557 if (!marking_deque_memory_committed_) { | 557 if (!marking_deque_memory_committed_) { |
558 bool success = marking_deque_memory_->Commit( | 558 bool success = marking_deque_memory_->Commit( |
559 reinterpret_cast<Address>(marking_deque_memory_->address()), | 559 reinterpret_cast<Address>(marking_deque_memory_->address()), |
560 marking_deque_memory_->size(), | 560 marking_deque_memory_->size(), |
561 false); // Not executable. | 561 VirtualMemory::NOT_EXECUTABLE); |
562 CHECK(success); | 562 CHECK(success); |
563 marking_deque_memory_committed_ = true; | 563 marking_deque_memory_committed_ = true; |
564 } | 564 } |
565 } | 565 } |
566 | 566 |
567 | 567 |
568 void IncrementalMarking::UncommitMarkingDeque() { | 568 void IncrementalMarking::UncommitMarkingDeque() { |
569 if (state_ == STOPPED && marking_deque_memory_committed_) { | 569 if (state_ == STOPPED && marking_deque_memory_committed_) { |
570 bool success = marking_deque_memory_->Uncommit( | 570 bool success = marking_deque_memory_->Uncommit( |
571 reinterpret_cast<Address>(marking_deque_memory_->address()), | 571 reinterpret_cast<Address>(marking_deque_memory_->address()), |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 bytes_scanned_ = 0; | 1033 bytes_scanned_ = 0; |
1034 write_barriers_invoked_since_last_step_ = 0; | 1034 write_barriers_invoked_since_last_step_ = 0; |
1035 } | 1035 } |
1036 | 1036 |
1037 | 1037 |
1038 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 1038 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
1039 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1039 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
1040 } | 1040 } |
1041 | 1041 |
1042 } } // namespace v8::internal | 1042 } } // namespace v8::internal |
OLD | NEW |