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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 8748005: Be more willing to expand old space when evacuating new space at the end of (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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
« src/mark-compact.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 { MaybeObject* maybe_obj = HEAP->AllocateFixedArray(100, TENURED); 135 { MaybeObject* maybe_obj = HEAP->AllocateFixedArray(100, TENURED);
136 if (!maybe_obj->ToObject(&obj)) break; 136 if (!maybe_obj->ToObject(&obj)) break;
137 } 137 }
138 138
139 host->set(0, obj); 139 host->set(0, obj);
140 host = FixedArray::cast(obj); 140 host = FixedArray::cast(obj);
141 } 141 }
142 142
143 // Call mark compact GC, and it should pass. 143 // Call mark compact GC, and it should pass.
144 HEAP->CollectGarbage(OLD_POINTER_SPACE); 144 HEAP->CollectGarbage(OLD_POINTER_SPACE);
145
146 // array should not be promoted because the old space is full.
147 CHECK(HEAP->InSpace(*array, NEW_SPACE));
148 } 145 }
149 146
150 147
151 TEST(MarkCompactCollector) { 148 TEST(MarkCompactCollector) {
152 InitializeVM(); 149 InitializeVM();
153 150
154 v8::HandleScope sc; 151 v8::HandleScope sc;
155 // call mark-compact when heap is empty 152 // call mark-compact when heap is empty
156 HEAP->CollectGarbage(OLD_POINTER_SPACE); 153 HEAP->CollectGarbage(OLD_POINTER_SPACE);
157 154
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 Handle<Object> object = 437 Handle<Object> object =
441 global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked()); 438 global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
442 439
443 TestRetainedObjectInfo info; 440 TestRetainedObjectInfo info;
444 global_handles->AddObjectGroup(NULL, 0, &info); 441 global_handles->AddObjectGroup(NULL, 0, &info);
445 ASSERT(info.has_been_disposed()); 442 ASSERT(info.has_been_disposed());
446 443
447 global_handles->AddImplicitReferences( 444 global_handles->AddImplicitReferences(
448 Handle<HeapObject>::cast(object).location(), NULL, 0); 445 Handle<HeapObject>::cast(object).location(), NULL, 0);
449 } 446 }
OLDNEW
« src/mark-compact.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698