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

Side by Side Diff: test/cctest/test-spaces.cc

Issue 5999010: Fix numerous bugs introduced by reducing Page::kMaxHeapObjectSize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 11 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/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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 CHECK(Heap::ConfigureHeapDefault()); 161 CHECK(Heap::ConfigureHeapDefault());
162 CHECK(MemoryAllocator::Setup(Heap::MaxReserved(), Heap::MaxExecutableSize())); 162 CHECK(MemoryAllocator::Setup(Heap::MaxReserved(), Heap::MaxExecutableSize()));
163 163
164 OldSpace* s = new OldSpace(Heap::MaxOldGenerationSize(), 164 OldSpace* s = new OldSpace(Heap::MaxOldGenerationSize(),
165 OLD_POINTER_SPACE, 165 OLD_POINTER_SPACE,
166 NOT_EXECUTABLE); 166 NOT_EXECUTABLE);
167 CHECK(s != NULL); 167 CHECK(s != NULL);
168 168
169 CHECK(s->Setup()); 169 CHECK(s->Setup());
170 170
171 while (s->Available() > 0) { 171 while (s->Available() > Page::kMaxHeapObjectSize) {
172 s->AllocateRaw(Page::kMaxHeapObjectSize)->ToObjectUnchecked(); 172 s->AllocateRaw(Page::kMaxHeapObjectSize)->ToObjectChecked();
173 } 173 }
174 174
175 s->TearDown(); 175 s->TearDown();
176 delete s; 176 delete s;
177 MemoryAllocator::TearDown(); 177 MemoryAllocator::TearDown();
178 } 178 }
179 179
180 180
181 TEST(LargeObjectSpace) { 181 TEST(LargeObjectSpace) {
182 CHECK(Heap::Setup(false)); 182 CHECK(Heap::Setup(false));
(...skipping 24 matching lines...) Expand all
207 HeapObject::cast(obj)->set_map(faked_map); 207 HeapObject::cast(obj)->set_map(faked_map);
208 CHECK(lo->Available() < available); 208 CHECK(lo->Available() < available);
209 }; 209 };
210 210
211 CHECK(!lo->IsEmpty()); 211 CHECK(!lo->IsEmpty());
212 212
213 CHECK(lo->AllocateRaw(lo_size)->IsFailure()); 213 CHECK(lo->AllocateRaw(lo_size)->IsFailure());
214 214
215 Heap::TearDown(); 215 Heap::TearDown();
216 } 216 }
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698