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

Unified Diff: src/mark-compact.cc

Issue 136001: Changed allocation to allow large objects to be allocated in new space.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 2217)
+++ src/mark-compact.cc (working copy)
@@ -949,11 +949,15 @@
// Try to promote all objects in new space. Heap numbers and sequential
// strings are promoted to the code space, all others to the old space.
Mads Ager (chromium) 2009/06/18 14:01:20 Not your code, but this comment seems wrong. Heap
inline Object* MCAllocateFromNewSpace(HeapObject* object, int object_size) {
- OldSpace* target_space = Heap::TargetSpace(object);
- ASSERT(target_space == Heap::old_pointer_space() ||
- target_space == Heap::old_data_space());
- Object* forwarded = target_space->MCAllocateRaw(object_size);
-
+ Object* forwarded ;
Mads Ager (chromium) 2009/06/18 14:01:20 Remove space before ';'.
+ if (object_size > Heap::MaxObjectSizeInPagedSpace()) {
+ forwarded = Failure::Exception();
+ } else {
+ OldSpace* target_space = Heap::TargetSpace(object);
+ ASSERT(target_space == Heap::old_pointer_space() ||
+ target_space == Heap::old_data_space());
+ forwarded = target_space->MCAllocateRaw(object_size);
+ }
if (forwarded->IsFailure()) {
forwarded = Heap::new_space()->MCAllocateRaw(object_size);
}
@@ -1674,7 +1678,7 @@
ASSERT(space->MCSpaceOffsetForAddress(new_addr) <=
space->MCSpaceOffsetForAddress(obj->address()));
- space->MCAdjustRelocationEnd(new_addr, obj_size);
+ reinterpret_cast<OldSpace*>(space)->MCAdjustRelocationEnd(new_addr, obj_size);
Mads Ager (chromium) 2009/06/18 14:01:20 space is already has type OldSpace*, so there shou
#ifdef DEBUG
if (FLAG_gc_verbose) {
« src/heap.cc ('K') | « src/ia32/builtins-ia32.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698