RFR: 8301403: Eliminate memory allocations in JVMFlag::printFlags during signal handling [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Jul 18 07:31:34 UTC 2024
On Thu, 18 Jul 2024 07:22:33 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > A very simple idea could be to pre-allocate a "memory balloon" ... Done smartly, one would integrate this somehow into os::malloc
>
> In other words os::malloc becomes a custom allocator that has a small memory pool available for use during error reporting. That would be a general purpose solution ...
In hs-err case - we expect a small amount of small mallocs - we could just allocate from the top of the balloon, and maybe allow re-adding the topmost allocation (to handle free of the very last malloc). That would not require a full-blown allocator that would allow arbitrary frees, which I agree would be over the top.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20202#issuecomment-2235817309
More information about the hotspot-runtime-dev
mailing list