"3 + 4" image
Brian Rice
water at tunes.org
Wed Feb 1 21:58:41 PST 2006
Tonight, I discovered that if you go into build.slate and replace the
#bootstrapFilenames file list in Image Definition with just one file,
and then put "3 + 4" in that file, you can do a successful bootstrap
and get a 104kb image output that does just that - adds two numbers.
This is a legendary kind of super-minimalization for Smalltalk
images, so I thought I'd check out the Slate possibility. It was
really easy, and there were no snags.
So for now that is the lower bound on image size. Tthe remaining
100kb consists of a lot of VM table linkage and primitive specs as
well as a symbol table that could probably be cut down further. I
haven't dug into it in detail, but I'm guessing that building a VM
with fewer modules would allow the table to be smaller so a smaller
output image. This isn't really a priority right now, but I wanted to
know for sure what the situation was. Probably it indicates the
general VM<->Image surface area, and I might use it as a metric for
future simplifications.
Anyway, try it yourself if you dig that kind of thing. I may shortly
write up some image-generation demos and save them in the repository
for reference.
Future possibilities: a tool that can scan image files to see what
object tree they have and explore it. Or, a tracer-based image
definition builder, to take an arbitrary program and determine
conservatively the minimum set of supporting structure it needs to
run, stand-alone. Or, a way to embed the image into the VM as a build
option so that the VM+image appear as a single binary transparently
(pretty easy, really - just modifies boot.c).
--
-Brian
http://tunes.org/~water/brice.vcf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20060201/c67ed96e/PGP.pgp
More information about the Slate
mailing list