Integrated: JDK-8286198: [linux] Fix process-memory information
Thomas Stuefe
stuefe at openjdk.java.net
Tue May 10 13:31:58 UTC 2022
On Thu, 5 May 2022 14:55:01 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> We use mallinfo/mallinfo2 to obtain information about the glibc used memory, but there is an error which causes it to be correct only for fine granular malloc allocations. glibc puts larger allocations in mmap-allocated areas, which were missing from the old calculation.
>
> This patch fixes that; it also adds information about memory retained in the glibc after free. Note that the latter unfortunately does not follow glibc trims because trimming is done AFAIK with madvice(MADV_DONTNEED) which does not seem to affect glibc internal bookkeeping. Still its a very valuable thing to know in order to estimate glibc overhead especially in fine granular mass allocation scenarios.
>
> Tests: Lots of manual tests with various malloc loads and granularities, in addition to automated tests.
This pull request has now been integrated.
Changeset: 9e320d9a
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/9e320d9ab1813eda705d7318ef964092c50d1ade
Stats: 7 lines in 1 file changed: 3 ins; 0 del; 4 mod
8286198: [linux] Fix process-memory information
Reviewed-by: dholmes, mbaesken
-------------
PR: https://git.openjdk.java.net/jdk/pull/8553
More information about the hotspot-runtime-dev
mailing list