RFR:8060074:Cleanup of unused memory tracking parameters in os::free and its callers.

harold seigel harold.seigel at oracle.com
Tue Nov 18 22:05:57 UTC 2014


Hi Max,

Changes look good.

Could you remove memflags from this comment in allocation.hpp?

   //   FREE_C_HEAP_OBJ(objname, type, memflags)


Thanks, Harold


On 11/18/2014 4:53 PM, 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