RFR: 8298293: NMT: should os::realloc() API take flags as arguments?

Thomas Stuefe stuefe at openjdk.org
Mon Feb 6 09:03:52 UTC 2023


On Mon, 6 Feb 2023 06:59:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > * remove MEMFLAGS from os::realloc() and NMTPreInit::handle_realloc() - why should caller have to specify this if the only allowed value is the one in the malloc header
> 
> @tstuefe that was the original question this issue was asking but the determined answer was "yes it should take the flags" - the reason being that when `realloc(null,size)` is used as an alias for `malloc(size)` then we need the flags

Ah, you are right, I forgot about that case.

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

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


More information about the hotspot-runtime-dev mailing list