RFR: JDK-8301749: Tracking malloc pooled memory size
Johan Sjölen
jsjolen at openjdk.org
Wed Feb 8 13:17:50 UTC 2023
On Wed, 8 Feb 2023 07:48:55 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> return -1.
>
> You aim to mimic the malloc_info() API at os:: level, so you should return -1 in case malloc_info failed, including failure do to resolving issues.
Wouldn't that lead to a caller not knowing whether `malloc_info` itself failed or if our wrapper failed? `malloc_info` also sets `errno`. I think it's better if we don't imitate `malloc_info`, by returning `-2` if `malloc_info` is missing, to distinguish the different states.
-------------
PR: https://git.openjdk.org/jdk/pull/12455
More information about the hotspot-runtime-dev
mailing list