OSM of GraalVM #3
SchrodingerZhu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An object consists of two separate parts:
Details:
Primitive Area and Object Area are separate; the later one is managed by GC.
Object is fixed sized. Use Extension Array for resize
Shapes are immutable, but we can switch to a new shape.
Locations are
final
andvolatile
Root of a shape is
empty
Transitions:
Implementation
Annotation:
@DynamicField
Need to decide: How many primitive/object fields should be provided.
Shapes use hidden classes, more friendlier to the guest languages with less runtime property changing.
In special cases, one can store the shape in Hashmap.
Memory Issue
The transition map uses
SoftReferences
for successor shapes, so that they can be released by the garbage collector under memory pressureThe properties collection in a shape is created lazily and only when actually used. It can be reconstructed (recursively) from the property collection of the predecessor shape by applying the changes of the transition that lead to this shape.
The system handles extremely large objects by de-grading to a fallback representation based on a hash table that does not require any shapes
Beta Was this translation helpful? Give feedback.
All reactions