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

Side by Side Diff: src/spaces-inl.h

Issue 9178021: When adjusting page's live bytes counter from the mutator adjust owners unswept free bytes counter. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« src/spaces.cc ('K') | « 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 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 ASSERT(length <= string->length()); 325 ASSERT(length <= string->length());
326 ASSERT(string->IsSeqString()); 326 ASSERT(string->IsSeqString());
327 ASSERT(string->address() + StringType::SizeFor(string->length()) == 327 ASSERT(string->address() + StringType::SizeFor(string->length()) ==
328 allocation_info_.top); 328 allocation_info_.top);
329 Address old_top = allocation_info_.top; 329 Address old_top = allocation_info_.top;
330 allocation_info_.top = 330 allocation_info_.top =
331 string->address() + StringType::SizeFor(length); 331 string->address() + StringType::SizeFor(length);
332 string->set_length(length); 332 string->set_length(length);
333 if (Marking::IsBlack(Marking::MarkBitFrom(string))) { 333 if (Marking::IsBlack(Marking::MarkBitFrom(string))) {
334 int delta = static_cast<int>(old_top - allocation_info_.top); 334 int delta = static_cast<int>(old_top - allocation_info_.top);
335 MemoryChunk::IncrementLiveBytes(string->address(), -delta); 335 MemoryChunk::IncrementLiveBytesFromMutator(string->address(), -delta);
336 } 336 }
337 } 337 }
338 338
339 339
340 bool FreeListNode::IsFreeListNode(HeapObject* object) { 340 bool FreeListNode::IsFreeListNode(HeapObject* object) {
341 Map* map = object->map(); 341 Map* map = object->map();
342 Heap* heap = object->GetHeap(); 342 Heap* heap = object->GetHeap();
343 return map == heap->raw_unchecked_free_space_map() 343 return map == heap->raw_unchecked_free_space_map()
344 || map == heap->raw_unchecked_one_pointer_filler_map() 344 || map == heap->raw_unchecked_one_pointer_filler_map()
345 || map == heap->raw_unchecked_two_pointer_filler_map(); 345 || map == heap->raw_unchecked_two_pointer_filler_map();
346 } 346 }
347 347
348 } } // namespace v8::internal 348 } } // namespace v8::internal
349 349
350 #endif // V8_SPACES_INL_H_ 350 #endif // V8_SPACES_INL_H_
OLDNEW
« src/spaces.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698