OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 #endif | 587 #endif |
588 #endif | 588 #endif |
589 } | 589 } |
590 | 590 |
591 static double HeapGrowingFactor(double gc_speed, double mutator_speed); | 591 static double HeapGrowingFactor(double gc_speed, double mutator_speed); |
592 | 592 |
593 // Copy block of memory from src to dst. Size of block should be aligned | 593 // Copy block of memory from src to dst. Size of block should be aligned |
594 // by pointer size. | 594 // by pointer size. |
595 static inline void CopyBlock(Address dst, Address src, int byte_size); | 595 static inline void CopyBlock(Address dst, Address src, int byte_size); |
596 | 596 |
597 // Optimized version of memmove for blocks with pointer size aligned sizes and | |
598 // pointer size aligned addresses. | |
599 static inline void MoveBlock(Address dst, Address src, int byte_size); | |
600 | |
601 // Determines a static visitor id based on the given {map} that can then be | 597 // Determines a static visitor id based on the given {map} that can then be |
602 // stored on the map to facilitate fast dispatch for {StaticVisitorBase}. | 598 // stored on the map to facilitate fast dispatch for {StaticVisitorBase}. |
603 static int GetStaticVisitorIdForMap(Map* map); | 599 static int GetStaticVisitorIdForMap(Map* map); |
604 | 600 |
605 // Notifies the heap that is ok to start marking or other activities that | 601 // Notifies the heap that is ok to start marking or other activities that |
606 // should not happen during deserialization. | 602 // should not happen during deserialization. |
607 void NotifyDeserializationComplete(); | 603 void NotifyDeserializationComplete(); |
608 | 604 |
609 intptr_t old_generation_allocation_limit() const { | 605 intptr_t old_generation_allocation_limit() const { |
610 return old_generation_allocation_limit_; | 606 return old_generation_allocation_limit_; |
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 friend class LargeObjectSpace; | 2634 friend class LargeObjectSpace; |
2639 friend class NewSpace; | 2635 friend class NewSpace; |
2640 friend class PagedSpace; | 2636 friend class PagedSpace; |
2641 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2637 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2642 }; | 2638 }; |
2643 | 2639 |
2644 } // namespace internal | 2640 } // namespace internal |
2645 } // namespace v8 | 2641 } // namespace v8 |
2646 | 2642 |
2647 #endif // V8_HEAP_HEAP_H_ | 2643 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |