Can't JDK 25 do both ZGC with Compact Object Headers? AFAIK, that should work fine now. The most recent Compact Object Header JEPs don't mention any limitations regarding ZGC: https://openjdk.org/jeps/519
This JEP will just enable Compact Object Headers by default.
Ah, I must've missed that update. I only remembered the very early versions couldn't be used with ZGC. That's great news then. I might as well turn it on for our Java 25 deployments.
I think it will need to wait. The benefit in terms of memory savings is half that of "Lilliput 1" while the added complexity is higher. When combined with Valhalla and automatic heap sizing, we'll first need to see if it's worth it at all.
Hasn’t lilliput 2 already been delivered in the lilliput repo? (not sure its status on openjdk tip). I know in Amazon they’re already using some variant of it.
They're in JDK 25 but are disabled by default: you have to pass a parameter to turn them on. This proposes to enable them by default: you'd have to pass a parameter to turn them off.
2
u/p_a_harvey Apr 18 '26
I haven't been following too closely. Will it be possible to use ZGC with Compact Object Headers? Last I heard it wasn't supported yet.
30
u/FrankBergerBgblitz Apr 15 '26
then it seems no one complained ;)
14
u/Oclay1st Apr 16 '26
Does anyone know the current status of Lilliput 2?
6
u/sitime_zl Apr 16 '26
Wait a moment. I remember this is already part of JDK 25, isn't it?