OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SPACES_H_ | 5 #ifndef V8_HEAP_SPACES_H_ |
6 #define V8_HEAP_SPACES_H_ | 6 #define V8_HEAP_SPACES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/atomic-utils.h" | 9 #include "src/atomic-utils.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2730 // when all allocation is performed from inlined generated code. | 2730 // when all allocation is performed from inlined generated code. |
2731 intptr_t inline_allocation_limit_step_; | 2731 intptr_t inline_allocation_limit_step_; |
2732 | 2732 |
2733 Address top_on_previous_step_; | 2733 Address top_on_previous_step_; |
2734 | 2734 |
2735 HistogramInfo* allocated_histogram_; | 2735 HistogramInfo* allocated_histogram_; |
2736 HistogramInfo* promoted_histogram_; | 2736 HistogramInfo* promoted_histogram_; |
2737 | 2737 |
2738 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment); | 2738 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment); |
2739 | 2739 |
2740 // If we are doing inline allocation in steps, this method performs the 'step' | |
2741 // operation. Right now incremental mark is the only consumer of inline | |
2742 // allocation steps. `top` the address just past the last byte allocated, i.e. | |
Hannes Payer (out of office)
2015/09/21 07:48:10
top is the memory address of the bump pointer at t
ofrobots
2015/09/21 20:32:58
Did you mean: "top is the memory address of the bu
| |
2743 // determines the numbers of bytes actually allocated since the last step. | |
2744 // `new_top` is the address where that the next byte is going be allocated | |
Hannes Payer (out of office)
2015/09/21 07:48:10
address of the bump pointer
Hannes Payer (out of office)
2015/09/21 07:48:10
remove "that"
| |
2745 // from. `top` and `new_top` may be different when we cross a page boundary or | |
2746 // reset the space. | |
2747 void InlineAllocationStep(Address top, Address new_top); | |
2748 | |
2740 friend class SemiSpaceIterator; | 2749 friend class SemiSpaceIterator; |
2741 }; | 2750 }; |
2742 | 2751 |
2743 // ----------------------------------------------------------------------------- | 2752 // ----------------------------------------------------------------------------- |
2744 // Compaction space that is used temporarily during compaction. | 2753 // Compaction space that is used temporarily during compaction. |
2745 | 2754 |
2746 class CompactionSpace : public PagedSpace { | 2755 class CompactionSpace : public PagedSpace { |
2747 public: | 2756 public: |
2748 CompactionSpace(Heap* heap, AllocationSpace id, Executability executable) | 2757 CompactionSpace(Heap* heap, AllocationSpace id, Executability executable) |
2749 : PagedSpace(heap, id, executable) {} | 2758 : PagedSpace(heap, id, executable) {} |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2981 count = 0; | 2990 count = 0; |
2982 } | 2991 } |
2983 // Must be small, since an iteration is used for lookup. | 2992 // Must be small, since an iteration is used for lookup. |
2984 static const int kMaxComments = 64; | 2993 static const int kMaxComments = 64; |
2985 }; | 2994 }; |
2986 #endif | 2995 #endif |
2987 } | 2996 } |
2988 } // namespace v8::internal | 2997 } // namespace v8::internal |
2989 | 2998 |
2990 #endif // V8_HEAP_SPACES_H_ | 2999 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |