Mark `allocate_new_tlab` and `unsafe_max_tlab_alloc` of `CollectedHeap` as `pure virtual`

Guoxiong Li lgxbslgx at gmail.com
Thu Mar 21 07:57:53 UTC 2024


Hi Stefan,

Thanks for your answer. Filed https://bugs.openjdk.org/browse/JDK-8328671
to follow up.

Best Regards,
-- Guoxiong

On Thu, Mar 21, 2024 at 3:27 PM Stefan Karlsson <stefan.karlsson at oracle.com>
wrote:

> Hi Guoxiong,
>
> On 2024-03-21 08:22, Guoxiong Li wrote:
> > Hi all,
> >
> > I noticed the methods `CollectedHeap::allocate_new_tlab` and
> > `CollectedHeap::unsafe_max_tlab_alloc` only have the statement
> > `guarantee(false, ...)`.
> > They are never run and overridden by subclasses.
> > Should we mark them as `pure virtual` instead of giving an
> implementation?
>
> Sounds like a good cleanup. Go for it.
>
> Thanks,
> StefanK
>
> >
> > I am going to submit a patch to change them.
> > But it is good to discuss it firstly and avoid the unnecessary ticket
> > and PR.
> >
> > Any ideas are appreciated. Thanks.
> >
> >
> > Best Regards,
> > -- Guoxiong
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20240321/231b5c98/attachment-0001.htm>


More information about the hotspot-gc-dev mailing list