RFR: 8280106: G1: Make reclaiming memory functionality more general in G1SegmentedArrayFreePool and G1SegmentedArrayFreeMemoryTask

Ivan Walulya iwalulya at openjdk.java.net
Thu Feb 10 09:41:07 UTC 2022


On Thu, 10 Feb 2022 09:24:04 GMT, Hamlin Li <mli at openjdk.org> wrote:

> > > Currently, Configuration is only used to get the number of object types. Do you suggest to use a const template parameter (e.g. template<MEMFLAGS flag, int NUM> class G1SegmentedArrayFreeMemoryTask) to replace the Configuration parameter? I don't object, but seems a Configuration parameter make it more clear to differentiate between 2 G1SegmentedArrayFreeMemoryTask even if they has the same number of object types. Please kindly let me know you suggestion.
> > 
> > 
> > Just seemed like overkill to use a template parameter, const template parameter does not solve that. If there is not work around that doesn't involve a new template parameter, then the Configuration is better because we might use it for more in the future. I was just wondering if we can pass the number of object types in constructor rather than template parameter.
> 
> So, do you agree to go with a Configuration as the template parameter? ( Sorry, I missed another use of Configuration which is Configuration::mem_object_type_name_str(i). )

Yes

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

PR: https://git.openjdk.java.net/jdk/pull/7121



More information about the hotspot-gc-dev mailing list