This is a breakout from JDK-8293114, which is starved for reviews. So I attempt to break up that fix into smaller units which are hopefully easier to review separately.
We use the glibc-specific mallinfo/mallinfo2 APIs to query libc internals. These are quite important, since they are the only way to get the malloc load and retained size from the glibc allocator. NMT only reports a tiny part of that (only the user-view of whatever hotspot allocated).
Using these APIs and staying glibc-agnostic requires some twiddling. This patch should provide a wrapper function in os::Linux to hide that twiddling.
We use the glibc-specific mallinfo/mallinfo2 APIs to query libc internals. These are quite important, since they are the only way to get the malloc load and retained size from the glibc allocator. NMT only reports a tiny part of that (only the user-view of whatever hotspot allocated).
Using these APIs and staying glibc-agnostic requires some twiddling. This patch should provide a wrapper function in os::Linux to hide that twiddling.
- relates to
-
JDK-8293114 JVM should trim the native heap
- Resolved