]> gitweb.factorcode.org Git - factor.git/blob - core/memory/memory.factor
a1e977f553901d7c58e13010cbe275597f90e693
[factor.git] / core / memory / memory.factor
1 ! Copyright (C) 2005, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.strings io.backend io.pathnames kernel
4 memory.private sequences system ;
5 IN: memory
6
7 : instances ( quot -- seq )
8     [ all-instances ] dip filter ; inline
9
10 : saving-path ( path -- saving-path path )
11     [ ".saving" append ] keep
12     [ native-string>alien ] bi@ ;
13
14 : save-image ( path -- )
15     normalize-path saving-path (save-image) ;
16
17 : save-image-and-exit ( path -- )
18     normalize-path saving-path (save-image-and-exit) ;
19
20 : save ( -- ) image save-image ;