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

Unified Diff: src/spaces.cc

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Addressed review comments. Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/spaces.h ('k') | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 8fdee1136896ee091e1dccd7ab214f9a01556a8a..1bb87523ba8ee1a73670a68caf03ba1ddb51925e 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -398,6 +398,7 @@ NewSpacePage* NewSpacePage::Initialize(Heap* heap, Address start) {
NOT_EXECUTABLE,
heap->new_space());
chunk->initialize_scan_on_scavenge(true);
+ chunk->SetFlag(MemoryChunk::IN_NEW_SPACE);
heap->incremental_marking()->SetNewSpacePageFlags(chunk);
return static_cast<NewSpacePage*>(chunk);
}
@@ -2173,12 +2174,9 @@ void LargeObjectSpace::FreeUnmarkedObjects() {
bool LargeObjectSpace::Contains(HeapObject* object) {
Address address = object->address();
- if (heap()->new_space()->Contains(address)) {
- return false;
- }
MemoryChunk* chunk = MemoryChunk::FromAddress(address);
- bool owned = chunk->owner() == this;
+ bool owned = (chunk->owner() == this);
SLOW_ASSERT(!owned
|| !FindObject(address)->IsFailure());
« no previous file with comments | « src/spaces.h ('k') | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698