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

Side by Side Diff: src/mark-compact.h

Issue 8139025: Keep MemoryChunk::LiveBytes in sync when marking deque overflows. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 void SetOverflowed() { overflowed_ = true; } 210 void SetOverflowed() { overflowed_ = true; }
211 211
212 // Push the (marked) object on the marking stack if there is room, 212 // Push the (marked) object on the marking stack if there is room,
213 // otherwise mark the object as overflowed and wait for a rescan of the 213 // otherwise mark the object as overflowed and wait for a rescan of the
214 // heap. 214 // heap.
215 inline void PushBlack(HeapObject* object) { 215 inline void PushBlack(HeapObject* object) {
216 ASSERT(object->IsHeapObject()); 216 ASSERT(object->IsHeapObject());
217 if (IsFull()) { 217 if (IsFull()) {
218 Marking::BlackToGrey(object); 218 Marking::BlackToGrey(object);
219 MemoryChunk::IncrementLiveBytes(object->address(), -object->Size());
219 SetOverflowed(); 220 SetOverflowed();
220 } else { 221 } else {
221 array_[top_] = object; 222 array_[top_] = object;
222 top_ = ((top_ + 1) & mask_); 223 top_ = ((top_ + 1) & mask_);
223 } 224 }
224 } 225 }
225 226
226 inline void PushGrey(HeapObject* object) { 227 inline void PushGrey(HeapObject* object) {
227 ASSERT(object->IsHeapObject()); 228 ASSERT(object->IsHeapObject());
228 if (IsFull()) { 229 if (IsFull()) {
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 784
784 friend class Heap; 785 friend class Heap;
785 }; 786 };
786 787
787 788
788 const char* AllocationSpaceName(AllocationSpace space); 789 const char* AllocationSpaceName(AllocationSpace space);
789 790
790 } } // namespace v8::internal 791 } } // namespace v8::internal
791 792
792 #endif // V8_MARK_COMPACT_H_ 793 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698