RFR: 8301136: Improve unlink() and unlink_all() of ResourceHashtableBase [v2]
Xin Liu
xliu at openjdk.org
Thu Jan 26 17:14:42 UTC 2023
> 1. Apply the same idea of JDK-8300184 to unlink().
> 2. Because ResourceHashtableBase doesn't support copy constructor and copy assignment, client of it has to purge all elements first. We would like provide a specialized version called 'unlink_all()'.
> We don't need to update each node's _next in this case. We only nullify all buckets. We also use unlink_all() in destructor. Despite this isn't the optimal code for a destructor, we reduce maintenance cost.
Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
Quit early if cnt is zero.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12213/files
- new: https://git.openjdk.org/jdk/pull/12213/files/709a7c2c..749ee745
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12213&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12213&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/12213.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12213/head:pull/12213
PR: https://git.openjdk.org/jdk/pull/12213
More information about the hotspot-dev
mailing list