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

Side by Side Diff: src/serialize.cc

Issue 6639024: Get rid of distinction between below- and above-watermark in page allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 9 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/runtime.cc ('k') | src/spaces.h » ('j') | src/spaces-inl.h » ('J')
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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 void Deserializer::VisitPointers(Object** start, Object** end) { 710 void Deserializer::VisitPointers(Object** start, Object** end) {
711 // The space must be new space. Any other space would cause ReadChunk to try 711 // The space must be new space. Any other space would cause ReadChunk to try
712 // to update the remembered using NULL as the address. 712 // to update the remembered using NULL as the address.
713 ReadChunk(start, end, NEW_SPACE, NULL); 713 ReadChunk(start, end, NEW_SPACE, NULL);
714 } 714 }
715 715
716 716
717 // This routine writes the new object into the pointer provided and then 717 // This routine writes the new object into the pointer provided and then
718 // returns true if the new object was in young space and false otherwise. 718 // returns true if the new object was in young space and false otherwise.
719 // The reason for this strange interface is that otherwise the object is 719 // The reason for this strange interface is that otherwise the object is
720 // written very late, which means the ByteArray map is not set up by the 720 // written very late, which means the FreeSpace map is not set up by the
721 // time we need to use it to mark the space at the end of a page free (by 721 // time we need to use it to mark the space at the end of a page free.
722 // making it into a byte array).
723 void Deserializer::ReadObject(int space_number, 722 void Deserializer::ReadObject(int space_number,
724 Space* space, 723 Space* space,
725 Object** write_back) { 724 Object** write_back) {
726 int size = source_->GetInt() << kObjectAlignmentBits; 725 int size = source_->GetInt() << kObjectAlignmentBits;
727 Address address = Allocate(space_number, space, size); 726 Address address = Allocate(space_number, space, size);
728 *write_back = HeapObject::FromAddress(address); 727 *write_back = HeapObject::FromAddress(address);
729 Object** current = reinterpret_cast<Object**>(address); 728 Object** current = reinterpret_cast<Object**>(address);
730 Object** limit = current + (size >> kPointerSizeLog2); 729 Object** limit = current + (size >> kPointerSizeLog2);
731 if (FLAG_log_snapshot_positions) { 730 if (FLAG_log_snapshot_positions) {
732 LOG(SnapshotPositionEvent(address, source_->position())); 731 LOG(SnapshotPositionEvent(address, source_->position()));
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1541 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1543 } 1542 }
1544 } 1543 }
1545 int allocation_address = fullness_[space]; 1544 int allocation_address = fullness_[space];
1546 fullness_[space] = allocation_address + size; 1545 fullness_[space] = allocation_address + size;
1547 return allocation_address; 1546 return allocation_address;
1548 } 1547 }
1549 1548
1550 1549
1551 } } // namespace v8::internal 1550 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/spaces.h » ('j') | src/spaces-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698