RFR 8056084: Refactor Hashtable to allow implementations without rehashing support
Gerard Ziemski
gerard.ziemski at oracle.com
Wed Aug 27 16:24:58 UTC 2014
hi Mikael,
I like the changes, even though I will have to merge my code with this
change later ;-)
The only thing that I don't understand, however, is the removed"#if
defined(SOLARIS)" clause at the bottom of hashtable.cpp
I am not a Reviewer (capital R), but please consider it reviewed
(lowercase r)
cheers
On 8/26/2014 10:26 AM, Mikael Gerdin wrote:
> Hi all,
>
> For JDK-8048268 I need to do some refactoring of the Hashtable class template.
>
> >From the bug description:
> In order to simplify usage of the Hashtable<T, F> class the code to perform
> rehashing of the SymbolTable and StringTable should be factored out to an
> intermediate class common to those two tables.
> Also factor out HashtableEntry freelist allocation to allow implementors an
> easier route for providing their own memory management.
>
> Introducing the new intermediary superclass requires some calls to superclass
> functions to be qualified using the "this->" syntax due to the C++ template
> name lookup rules.
>
> a comment about hashtable.cpp RehashableHashtable::dump_table:
>
> - int bucket_bytes = (int)num_buckets * sizeof(bucket(0));
> + int bucket_bytes = (int)num_buckets * sizeof(HashtableBucket<F>);
>
> I decided to change the sizeof to count the size of the hashtable bucket class
> instead of the HashtableEntry* returned by bucket(0), even though they may be
> of the same size currently.
>
> Note that the webrev url refers to another bug.
> Webrev: http://cr.openjdk.java.net/~mgerdin/8048268/hashtable-refactor/webrev/
> Buglink: https://bugs.openjdk.java.net/browse/JDK-8056084
>
> Testing: JPRT.
>
>
>
More information about the hotspot-dev
mailing list