file mapping thoughts?

Marcel Weiher marcel at metaobject.com
Wed Feb 7 01:51:37 UTC 2001


> From: Hans-Martin Mosner <hmm at heeg.de>

> VisualWorks uses this to load (the "permanent" part of) images  
quickly. For
> Smalltalk, it works only well if the image is loaded to the same  
address it
> had when it was saved, because otherwise the pointer relocation  
dirties all
> the mapped pages.

I implemented file-mapping for the MacOS-X VM.  It does help  
somewhat, but it would probably be even better if there were no  
dirtying of pages.  I remember seeing a comment on this list that  
with the current VM, the pointer-fixing phase has to run even if the  
image does load at the exact same location.  Of course, it would be  
really nice to have a shareable 'base' image with specific overlays.   


> I think that Squeak's memory model should work well with mmapped  
image files,

Should, but the current VM code pretty much assumes that it (f)reads  
the image data into a pre-allocated piece of memory, I had to resort  
to a little bit of nastiness to get mapping to work.

> especially on platforms where the application's data segment is  
always at the
> same address.

Yup!

Marcel






More information about the Squeak-dev mailing list