92 // for example, when LAB allocation is used in a space covered by the
93 // table.)
94 virtual HeapWord* block_start_unsafe(const void* addr) = 0;
95 // Same as above, but does not have any of the possible side effects
96 // discussed above.
97 virtual HeapWord* block_start_unsafe_const(const void* addr) const = 0;
98
99 // Returns the address of the start of the block containing "addr", or
100 // else "null" if it is covered by no block. (May have side effects,
101 // namely updating of shared array entries that "point" too far
102 // backwards. This can occur, for example, when lab allocation is used
103 // in a space covered by the table.)
104 inline HeapWord* block_start(const void* addr);
105 // Same as above, but does not have any of the possible side effects
106 // discussed above.
107 inline HeapWord* block_start_const(const void* addr) const;
108 };
109
110 class G1BlockOffsetSharedArrayMappingChangedListener : public G1MappingChangedListener {
111 public:
112 virtual void on_commit(uint start_idx, size_t num_regions) {
113 // Nothing to do. The BOT is hard-wired to be part of the HeapRegion, and we cannot
114 // retrieve it here since this would cause firing of several asserts. The code
115 // executed after commit of a region already needs to do some re-initialization of
116 // the HeapRegion, so we combine that.
117 }
118 };
119
120 // This implementation of "G1BlockOffsetTable" divides the covered region
121 // into "N"-word subregions (where "N" = 2^"LogN". An array with an entry
122 // for each such subregion indicates how far back one must go to find the
123 // start of the chunk that includes the first word of the subregion.
124 //
125 // Each BlockOffsetArray is owned by a Space. However, the actual array
126 // may be shared by several BlockOffsetArrays; this is useful
127 // when a single resizable area (such as a generation) is divided up into
128 // several spaces in which contiguous allocation takes place,
129 // such as, for example, in G1 or in the train generation.)
130
131 // Here is the shared array type.
132
|
92 // for example, when LAB allocation is used in a space covered by the
93 // table.)
94 virtual HeapWord* block_start_unsafe(const void* addr) = 0;
95 // Same as above, but does not have any of the possible side effects
96 // discussed above.
97 virtual HeapWord* block_start_unsafe_const(const void* addr) const = 0;
98
99 // Returns the address of the start of the block containing "addr", or
100 // else "null" if it is covered by no block. (May have side effects,
101 // namely updating of shared array entries that "point" too far
102 // backwards. This can occur, for example, when lab allocation is used
103 // in a space covered by the table.)
104 inline HeapWord* block_start(const void* addr);
105 // Same as above, but does not have any of the possible side effects
106 // discussed above.
107 inline HeapWord* block_start_const(const void* addr) const;
108 };
109
110 class G1BlockOffsetSharedArrayMappingChangedListener : public G1MappingChangedListener {
111 public:
112 virtual void on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
113 // Nothing to do. The BOT is hard-wired to be part of the HeapRegion, and we cannot
114 // retrieve it here since this would cause firing of several asserts. The code
115 // executed after commit of a region already needs to do some re-initialization of
116 // the HeapRegion, so we combine that.
117 }
118 };
119
120 // This implementation of "G1BlockOffsetTable" divides the covered region
121 // into "N"-word subregions (where "N" = 2^"LogN". An array with an entry
122 // for each such subregion indicates how far back one must go to find the
123 // start of the chunk that includes the first word of the subregion.
124 //
125 // Each BlockOffsetArray is owned by a Space. However, the actual array
126 // may be shared by several BlockOffsetArrays; this is useful
127 // when a single resizable area (such as a generation) is divided up into
128 // several spaces in which contiguous allocation takes place,
129 // such as, for example, in G1 or in the train generation.)
130
131 // Here is the shared array type.
132
|