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

Side by Side Diff: src/heap.h

Issue 9537011: Merge r10809 into 3.7 branch (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.7/
Patch Set: Created 8 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/deoptimizer.cc ('k') | src/heap.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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 *target = e.obj_; 342 *target = e.obj_;
343 *size = e.size_; 343 *size = e.size_;
344 return; 344 return;
345 } 345 }
346 346
347 if (NewSpacePage::IsAtStart(reinterpret_cast<Address>(front_))) { 347 if (NewSpacePage::IsAtStart(reinterpret_cast<Address>(front_))) {
348 NewSpacePage* front_page = 348 NewSpacePage* front_page =
349 NewSpacePage::FromAddress(reinterpret_cast<Address>(front_)); 349 NewSpacePage::FromAddress(reinterpret_cast<Address>(front_));
350 ASSERT(!front_page->prev_page()->is_anchor()); 350 ASSERT(!front_page->prev_page()->is_anchor());
351 front_ = 351 front_ =
352 reinterpret_cast<intptr_t*>(front_page->prev_page()->body_limit()); 352 reinterpret_cast<intptr_t*>(front_page->prev_page()->area_end());
353 } 353 }
354 *target = reinterpret_cast<HeapObject*>(*(--front_)); 354 *target = reinterpret_cast<HeapObject*>(*(--front_));
355 *size = static_cast<int>(*(--front_)); 355 *size = static_cast<int>(*(--front_));
356 // Assert no underflow. 356 // Assert no underflow.
357 SemiSpace::AssertValidRange(reinterpret_cast<Address>(rear_), 357 SemiSpace::AssertValidRange(reinterpret_cast<Address>(rear_),
358 reinterpret_cast<Address>(front_)); 358 reinterpret_cast<Address>(front_));
359 } 359 }
360 360
361 private: 361 private:
362 // The front of the queue is higher in the memory page chain than the rear. 362 // The front of the queue is higher in the memory page chain than the rear.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 intptr_t CommittedMemory(); 476 intptr_t CommittedMemory();
477 477
478 // Returns the amount of executable memory currently committed for the heap. 478 // Returns the amount of executable memory currently committed for the heap.
479 intptr_t CommittedMemoryExecutable(); 479 intptr_t CommittedMemoryExecutable();
480 480
481 // Returns the available bytes in space w/o growing. 481 // Returns the available bytes in space w/o growing.
482 // Heap doesn't guarantee that it can allocate an object that requires 482 // Heap doesn't guarantee that it can allocate an object that requires
483 // all available bytes. Check MaxHeapObjectSize() instead. 483 // all available bytes. Check MaxHeapObjectSize() instead.
484 intptr_t Available(); 484 intptr_t Available();
485 485
486 // Returns the maximum object size in paged space.
487 inline int MaxObjectSizeInPagedSpace();
488
489 // Returns of size of all objects residing in the heap. 486 // Returns of size of all objects residing in the heap.
490 intptr_t SizeOfObjects(); 487 intptr_t SizeOfObjects();
491 488
492 // Return the starting address and a mask for the new space. And-masking an 489 // Return the starting address and a mask for the new space. And-masking an
493 // address with the mask will result in the start address of the new space 490 // address with the mask will result in the start address of the new space
494 // for all addresses in either semispace. 491 // for all addresses in either semispace.
495 Address NewSpaceStart() { return new_space_.start(); } 492 Address NewSpaceStart() { return new_space_.start(); }
496 uintptr_t NewSpaceMask() { return new_space_.mask(); } 493 uintptr_t NewSpaceMask() { return new_space_.mask(); }
497 Address NewSpaceTop() { return new_space_.top(); } 494 Address NewSpaceTop() { return new_space_.top(); }
498 495
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 2552
2556 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2553 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2557 }; 2554 };
2558 #endif // DEBUG || LIVE_OBJECT_LIST 2555 #endif // DEBUG || LIVE_OBJECT_LIST
2559 2556
2560 } } // namespace v8::internal 2557 } } // namespace v8::internal
2561 2558
2562 #undef HEAP 2559 #undef HEAP
2563 2560
2564 #endif // V8_HEAP_H_ 2561 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698