3 ms·
You are. Here's a great idea, if you've never implemented a JVM don't tell somebody how it works. Java VM isn't native code. Serialized objects are "Field"(s)
by valarauca1 11y ago
You are. Here's a great idea, if you've never implemented a JVM don't tell somebody how it works.
Java VM isn't native code. Serialized objects are "Field"(s) within the JVM. Which is short hand for a "Growable Page File" more or less. Which starts at a fixed 32bit address. How does that work? JVM implementation takes care of that, so you decide.
On top of that whats inside the Field itself doesn't actually matter to anyone provided the same read/write opcodes do the right thing(s).
The serialization process starts by jumping to your initial field, copying the serialized data into another buffer. While checking integrity, and assuring that your data conforms to the serialization standard b/c its in memory representation doesn't. The fun part is when ever it encounters a RetAddr type it has to jump to that Field, and serialize THAT Field also, as that Field is part of the object your serializing. Of course you don't actually know whats in the Field without consulting its ClassField which gives you a basic prototype of what-is-where.
Furthermore what ever optimizations the JIT makes, it'll end up treating Fields more-or-less like stack frames. So you have to keep an active record of how it'll mangle memory, so you know how to untangle that when you want to do serialization.
Understand now?