RFR: 8251158: Implementation of JEP 387: Elastic Metaspace [v9]
Richard Reingruber
rrich at openjdk.java.net
Mon Oct 5 13:05:44 UTC 2020
On Mon, 5 Oct 2020 12:35:20 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/share/memory/metaspace/freeChunkList.hpp line 74:
>>
>>> 72: // structure can easily be optimized (e.g. a BST). But for now lets keep this simple.
>>> 73:
>>> 74: class FreeChunkList {
>>
>> This is about the 3rd list implementation (so far) in this change (boilerplate code!). It would be awesome if one or
>> two could be replaced with
>> [LinkedList](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/linkedlist.hpp). Currently this is
>> not possible, because `LinkedListNodes` cannot be placed into the payload. What about filing a RFE about adding and
>> using a `LinkedList` implementation that allows this?
>
> Yes, this could possibly be done. Its a bit of a matter of taste. In this case note that FreeChunkList orders chunks by
> commit state on insert, and does other stuff particular to that list, so you will need to revive that functionality. As
> it is now I find this coding clear and easy to read. Any solution we arrive at after factoring out should not be worse.
I have not yet looked closely at freeChunkList.[ch]pp. Maybe `FreeChunkList` isn't a good candidate for doing it. I
still think there is potential for reuse. I'm ok with postponing it though.
-------------
PR: https://git.openjdk.java.net/jdk/pull/336
More information about the hotspot-gc-dev
mailing list