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

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

Issue 7124006: Two-page newspace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Address review comments. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 bool Heap::OldGenerationAllocationLimitReached() { 285 bool Heap::OldGenerationAllocationLimitReached() {
286 if (!incremental_marking()->IsStopped()) return false; 286 if (!incremental_marking()->IsStopped()) return false;
287 return OldGenerationSpaceAvailable() < 0; 287 return OldGenerationSpaceAvailable() < 0;
288 } 288 }
289 289
290 290
291 bool Heap::ShouldBePromoted(Address old_address, int object_size) { 291 bool Heap::ShouldBePromoted(Address old_address, int object_size) {
292 // An object should be promoted if: 292 // An object should be promoted if:
293 // - the object has survived a scavenge operation or 293 // - the object has survived a scavenge operation or
294 // - to space is already 25% full. 294 // - to space is already 25% full.
295 // TODO(gc): Do something about age-mark in paged new-space.
295 return old_address < new_space_.age_mark() 296 return old_address < new_space_.age_mark()
296 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2); 297 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2);
297 } 298 }
298 299
299 300
300 void Heap::RecordWrite(Address address, int offset) { 301 void Heap::RecordWrite(Address address, int offset) {
301 if (!InNewSpace(address)) store_buffer_.Mark(address + offset); 302 if (!InNewSpace(address)) store_buffer_.Mark(address + offset);
302 } 303 }
303 304
304 305
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 689
689 690
690 Heap* _inline_get_heap_() { 691 Heap* _inline_get_heap_() {
691 return HEAP; 692 return HEAP;
692 } 693 }
693 694
694 695
695 } } // namespace v8::internal 696 } } // namespace v8::internal
696 697
697 #endif // V8_HEAP_INL_H_ 698 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698