Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: src/incremental-marking.cc

Issue 23641009: Refactor and cleanup VirtualMemory. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698