RFR: 8320370: NMT: Change MallocMemorySnapshot to simplify code. [v2]

Stefan Karlsson stefank at openjdk.org
Tue Nov 21 14:25:12 UTC 2023


On Tue, 21 Nov 2023 13:50:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> > > Nice clean up!
> > > Just one question: I'm probably missing something here, but did we have to change from `ResourceObj` to `AnyObj` for this change to work?
> > 
> > 
> > Hi Gerard, no I think it is unnecessary to do this change to make it work (I haven't checked). I do think keeping it as `AnyObj` is a good idea however, as `MallocMemorySnapshot` is never resource allocated.
> 
> Why not make it a simple object then? Why derive from anything at all?
> 
> (Update: I am fine with the current state of the patch; up to you)

+1 Please don't use AnyObj unless you really need multiple allocation strategies.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16724#issuecomment-1821019431


More information about the hotspot-runtime-dev mailing list