Bootstrap fix

slava 2006-03-28 04:03:25 +00:00
parent 6514e5f7cb
commit d9a341003c
5 changed files with 24 additions and 24 deletions

View File

@ -2,11 +2,9 @@
- x86 %box-struct
- x86 %write-barrier
- bundle freetype .dylib in the .app on OS X
- x11 title bars are funny
- x11 wheel mouse test
- changelog in the UI
- set resource path to image parent directory
- amd64 %box-struct
+ portability:

View File

@ -105,3 +105,11 @@ IN: kernel
: win32? windows? cell 4 = and ; inline
: win64? windows? cell 8 = and ; inline
IN: memory
: generations ( -- n ) 15 getenv ;
: image ( -- path ) 16 getenv ;
: save ( -- ) image save-image ;

View File

@ -1,4 +1,4 @@
USING: generic help kernel kernel-internals sequences ;
USING: generic help kernel kernel-internals memory sequences ;
HELP: eq? "( obj1 obj2 -- ? )"
{ $values { "obj1" "an object" } { "obj2" "an object" } }
@ -246,3 +246,18 @@ HELP: set-array-nth "( elt n array -- )"
{ $values { "elt" "an object" } { "n" "a non-negative fixnum" } { "array" "an array" } }
{ $description "Low-level array element mutator." }
{ $warning "This word is in the " { $snippet "kernel-internals" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory." } ;
HELP: generations "( -- n )"
{ $values { "n" "a positive integer" } }
{ $description "Outputs the number of generations partitioning the heap." } ;
HELP: image "( -- path )"
{ $values { "path" "a path name string" } }
{ $description "Outputs the path name of the currently running Factor image." } ;
HELP: save-image "( path -- )"
{ $values { "path" "a path name string" } }
{ $description "Saves a snapshot of the heap to the given file, overwriting the file if it already exists." } ;
HELP: save "( -- )"
{ $description "Saves a snapshot of the heap to the current image file." } ;

View File

@ -5,14 +5,8 @@ USING: arrays errors generic hashtables io kernel
kernel-internals lists math namespaces parser prettyprint
sequences strings vectors words ;
: generations ( -- n ) 15 getenv ;
: full-gc ( -- ) generations 1 - gc ;
: image ( -- path ) 16 getenv ;
: save ( -- ) image save-image ;
! Printing an overview of heap usage.
: kb.

View File

@ -1,24 +1,9 @@
IN: memory
USING: help ;
HELP: generations "( -- n )"
{ $values { "n" "a positive integer" } }
{ $description "Outputs the number of generations partitioning the heap." } ;
HELP: full-gc "( -- )"
{ $description "Performs a full garbage collection." } ;
HELP: image "( -- path )"
{ $values { "path" "a path name string" } }
{ $description "Outputs the path name of the currently running Factor image." } ;
HELP: save-image "( path -- )"
{ $values { "path" "a path name string" } }
{ $description "Saves a snapshot of the heap to the given file, overwriting the file if it already exists." } ;
HELP: save "( -- )"
{ $description "Saves a snapshot of the heap to the current image file." } ;
HELP: room. "( -- )"
{ $description "Prints an overview of memory usage broken down by generation and zone." } ;