RFR: 8330006: Serial: Extract out ContiguousSpace::block_start_const [v2]
Albert Mingkun Yang
ayang at openjdk.org
Wed Apr 10 13:57:10 UTC 2024
On Wed, 10 Apr 2024 13:51:11 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> src/hotspot/share/gc/serial/defNewGeneration.hpp line 162:
>>
>>> 160: // some heaps may not pack objects densely; a chunk may either be an
>>> 161: // object or a non-object. If "p" is not in the space, return null.
>>> 162: HeapWord* block_start_const(const ContiguousSpace* cs, const void* p) const;
>>
>> Can this be static function in cpp? (It'd be good if it is not exposed, even as private api.)
>
>> Can this be static function in cpp?
>
> I marked it as static just now.
>
>> (It'd be good if it is not exposed, even as private api.)
>
> It is in the default (private) segment now.
My prev msg was probably unclear: I meant instead of adding `block_start_const` to the class, defining them as static function in cpp. For example, `fill_range` in `serialBlockOffsetTable.cpp`.
If possible, the (private) api will be smaller.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18722#discussion_r1559485481
More information about the hotspot-gc-dev
mailing list