scsh-users
[Top] [All Lists]

Re: Mine's bigger

To: shivers@ai.mit.edu
Subject: Re: Mine's bigger
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
Date: Fri, 03 Nov 1995 10:41:11 -0500
Cc: scsh@martigny.ai.mit.edu
Hmm.  I just tried using (dump-scsh-program ... ...) on a trivial
hello-world program and wound up with a 1.8MB heap image which, when I
poke through it using emacs or "strings", sure looks like it contains
large chunks of the compiler and command processor.

I tried a couple of things, first the obvious

% scsh
Scsh 0.4
> (define (main . args)
        (run (echo "hello, world")))
> (main)
hello, world
0
> (dump-scsh-program main "/tmp/hello.image")
Writing /tmp/hello.image
#t
> (run (ls -l /tmp/hello.image))
-rw-rw-r--  1 sommerfe  wheel  1875920 Nov  3 10:19 /tmp/hello.image

If I used ,flush first, the image shrunk by about 200K

Am I doing anything wrong?

Can someone spell out, in little baby steps, what's needed to dump a
"small" image containing the above program?

Even if I use (display ...) instead of (run (echo ...)) it's still 1.8MB..

                                        - Bill

<Prev in Thread] Current Thread [Next in Thread>