Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1018677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:53:38+00:00 2026-05-16T10:53:38+00:00

I have a feeling that I am going to ask a stupid question, yet

  • 0

I have a feeling that I am going to ask a “stupid” question, yet I must ask …

I have 2 virtual machines.

I would like to copy an instance of an object from one to another,

Is it possible to copy the bits that represents this object in the VM’s heap, send it to the other VM, like that the other VM just need to allocate the bits in it’s memory and add a reference in it’s stack to this memory slot…?

Currently, in order to do such a thing we serialize the object and unserialize it, which is much less efficient(computational wise) than just copy the instance as is…the parsing is a computational waste…

JS serialization Example: each VM is an instance of V8 (JavaScript),
one way of doing it is to convert the object to JSON(JSON.stringify), send it some how to the other VM which get the string and convert it back to object ( e.g. var myObject = eval('(' + myJSONtext + ')');) .. (JavaScript is just an example here, this is some sort of serialization)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:53:39+00:00Added an answer on May 16, 2026 at 10:53 am

    Lets ignore for a second the naive assumption that you can generalize this question over multiple VMs easily. Any attempt to build a mechanism like this would be heavily dependent on the implementation details of the VM you were building the mechanism for.

    Here are several reasons why this isn’t done:

    1. In-core representation is not generally portable across architectures. If I were sending an “object” from a VM on a SPARC machine to a VM on an x86 machine without knowledge of its structure, the object would appear corrupt on the other side.

    2. The object will not neccesarily exist at the same memory location on both machines, so internal pointers within the object will need to be patched up after it reaches the second VM. This too requires internal knowledge of the object’s structure.

    3. The object probably contains references to other objects, thus copying an object means copying a tree of objects, and generally not an acyclic tree either. You end up building code that looks an awful lot like a serialization library in order to do this reliably.

    4. Objects often hold on to native resources (like file handles and sockets) that can’t be reliably transmitted across machines.

    5. In many VMs, there is a distinction made between data (the object you’re trying to copy) and metadata (for example, the class of the object you’re trying to copy). In these kinds of VMs, even if you could copy the object bit-for-bit unscathed, it might depend on a bunch of metadata that doesn’t exist at the remote end. Copying metadata bit-for-bit is also tricky, as many VMs use implementation techniques (such as a global pool of interned strings or memory mapped object code) that make the data inherently non-portable. You also might end up with much more metadata than you want (e.g. in .net the smallest unit of metadata that you can package up and send somewhere is typically an assembly).

    6. In-core representation is generally not portable among different versions of the same VM and don’t contain internal version information that could be used to patch up the data.

    7. In-core representation contains lots of things (e.g. inline caches, garbage collection information) that don’t need to be copied. Copying this stuff would be wasteful, and the information might not even be sensible on the other side.

    Basically, to do this reliably, you end up building the world’s most awkward and unreliable serialization library, and the performance gains of the simple memory copy are lost in patching up the many things that get broken when you do the copy naively.

    Thus, these mechanisms tend not to exist.

    There is one huge exception to this rule: image based virtual machines (such as many smalltalk and self VMs) are built around the idea that the virtual machine state exists in an “image” that can be copied, moved between machines, etc. This generally comes at a substantial performance cost.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling that there must be client-server synchronization patterns out there. But
I am relatively new to php and have a feeling that I am going
I have the feeling that is easy to find samples, tutorials and simple examples
I have a feeling that I already know the answer to this one, but
I have the feeling that Flash -based ( or Silverlight -based) websites are generally
I have a feeling this question is a can of worms but I am
I have a feeling this is a repost but I can't seem to find
I curious to how different people solve integration of systems. I have a feeling
I'm the leader of a small web development team, and I have a feeling
idea I would like to create a little app for myself to store ideas

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.