RFR: 8320370: NMT: Change MallocMemorySnapshot to simplify code.

Johan Sjölen jsjolen at openjdk.org
Mon Nov 20 09:34:39 UTC 2023


Hi,

`MallocMemorySnapshot` used to be initialized in a quite non-standard way, using global placement new on an array of `size_t` of the size required to fit `MallocMemorySnapshot`. This looks like it was intended to circumvent some `ResourceObj` internals, but I'm unsure of its purpose. This change does what you expect a regular initialization of a global variable to look like.

~Currently running through tier1.~ GHA passed and so did tier1 on Oracle CI.

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

Commit messages:
 - Make this AnyObj

Changes: https://git.openjdk.org/jdk/pull/16724/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16724&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8320370
  Stats: 15 lines in 5 files changed: 0 ins; 7 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/16724.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16724/head:pull/16724

PR: https://git.openjdk.org/jdk/pull/16724


More information about the hotspot-runtime-dev mailing list