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

Unified Diff: src/serialize.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
« src/mark-compact.cc ('K') | « src/mark-compact.cc ('k') | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
===================================================================
--- src/serialize.cc (revision 2217)
+++ src/serialize.cc (working copy)
@@ -1261,15 +1261,19 @@
found = Heap::InSpace(obj, s);
}
CHECK(found);
+ int size = obj->Size();
if (s == NEW_SPACE) {
- Space* space = Heap::TargetSpace(obj);
- ASSERT(space == Heap::old_pointer_space() ||
- space == Heap::old_data_space());
- s = (space == Heap::old_pointer_space()) ?
- OLD_POINTER_SPACE :
- OLD_DATA_SPACE;
+ if (size > Heap::MaxObjectSizeInPagedSpace()) {
+ s = LO_SPACE;
+ } else {
+ OldSpace* space = Heap::TargetSpace(obj);
+ ASSERT(space == Heap::old_pointer_space() ||
+ space == Heap::old_data_space());
+ s = (space == Heap::old_pointer_space()) ?
+ OLD_POINTER_SPACE :
+ OLD_DATA_SPACE;
+ }
}
- int size = obj->Size();
GCTreatment gc_treatment = DataObject;
if (obj->IsFixedArray()) gc_treatment = PointerObject;
else if (obj->IsCode()) gc_treatment = CodeObject;
« src/mark-compact.cc ('K') | « src/mark-compact.cc ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698