[ENH][FIX][VM] Root-bit problem solved

Andreas Raab andreas.raab at gmx.de
Wed Aug 6 22:01:03 UTC 2003


Attached is a CS which fixes both the root-bit problem as well as cleaning
up the external prims upon image save, thus removing the need to do multiple
OM enumerations when starting the image.

With these changes it is possible for a platform that has a "reasonably good
guess" about images typically coming up at the same location in memory to do
a quick dump of the image file to prevent later relocation alltogether. In
order to do this, a VM can simply do something like:

  /* Read the image into memory, relocating everything */
  imageFile = sqImageFileOpen(imageName,"rb");
  dataSize := readImageFromFileHeapSizeStartingAt(imageFile, memory,
offset);
  sqImageFileClose(imageFile);

  /* dump it back out so that we won't have to relocate again */
  writeImageFile(dataSize);

The changes are completely backward compatible since we use the wrongly set
root bit as a trigger for doing the (now obsolete) clean up work upon image
startup.

The attached CS also merges some of the snapshot related methods since they
were duplicating lots and lots of code for the case of embedded vs.
non-embedded image saves.

Cheers,
  - Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RootBitCleanup.2.cs
Type: application/octet-stream
Size: 8514 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030807/291b97a4/RootBitCleanup.2.obj


More information about the Squeak-dev mailing list