Programmatically save image, and also do it periodically
John M McIntosh
johnmci at smalltalkconsulting.com
Tue Jan 8 18:36:50 UTC 2008
In the mailing list archives there was a long discussion of coding up
a special unix VM that uses unix's virtual memory features to
fork the squeak process and do copy on write. This let the fork/
snapshot logic then save the image to disk, and let the copy of the
process continue
running at the expense of abusing the virtual memory features of Unix.
This ensured you got a correct copy of your image written to disk, and
that the write process did not hang up the image. If you dig a bit
more you'll
see you can call the save logic without the prompt, but what happens
is a full GC happens, then the machine is written out to disk. This
process takes many
milliseconds/seconds and can be a long time if the image is really
large. Then if the image is busy you'll run into things like dropping
socket open requests because
the VM does not respond to them promptly.
On Jan 8, 2008, at 10:18 AM, itsme213 wrote:
> I need to urgently do both these saves:
> - do these on command (via Seaside app interface)
> - automatically on a timer
>
> I've browsed a bit and found
> SmalltalkImage current snapshot:andQuit:
>
> But this seems to require a confirmation. How do I bypass that?
>
> I found STimer for timed block execution, but found no way to stop an
> STimer.
>
> Help appreciated,
>
> Sophie
>
>
>
>
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Squeak-dev
mailing list
|