RFR:8060074:Cleanup of unused memory tracking parameters in os::free and its callers.
David Holmes
david.holmes at oracle.com
Wed Nov 19 02:47:56 UTC 2014
Hi Max,
So I would have assumed memflags were being passed to all the "free"
routines for NMT purposes. Otherwise how does NMT track this?
Thanks,
David
On 19/11/2014 7:53 AM, Max Ockner wrote:
> Hello all,
> Please review this minor cleanup:
>
> Bug ID: 8060074
> Webrev: http://cr.openjdk.java.net/~coleenp/8060074/
>
> Summary:
> (1) os::free takes two arguments, but never uses the second argument,
> which is a MEMFLAG. I have removed this argument from every os::free call.
> (2) The FreeHeap method in src/share/vm/memory/allocation.inline.hpp
> also takes a MEMFLAG argument, which is only used to call os::free. Now
> an unused argument, it has been removed from all FreeHeap calls. No
> other methods which directly call os::free() have this problem.
> (3) The FREE_C_HEAP_ARRAY macro in src/share/vm/memory/allocation.hpp
> takes A MEMFLAG argument which is passed to FreeHeap, and nothing else.
> This argument is now unused, and has been removed. No other methods
> which call FreeHeap have this problem.
>
> No methods or macros which use the FREE_C_HEAP_ARRAY macro needed
> cleanup. I have also removed the extra argument from the definitions of
> the above methods.
>
> Tests: jtreg hotspot tests with -vmoption:"-XX:NativeMemoryTrackingdetail"
>
> Thanks for your help,
> Max Ockner
More information about the hotspot-dev
mailing list