Commit Graph

56 Commits

Author SHA1 Message Date
Poul-Henning Kamp
c3a82ca0a6 Steven Wallace provided a program which broke this stuff. I guess there are
more weird kinds of a.out than anyone can argue for.  This code failed to
load the first 28K of the text-segment, in the case where the first page
of the a.out contains only the a.out-header, and the text is still at 0x0.
Thanks Steven !
1994-10-06 18:22:24 +00:00
Poul-Henning Kamp
009bc0f68d David Greenman told me to do this: (Thanks!) use vm_allocate to allocate
the uncompression buffer.  Now malloc(M_GZIP) is used for all the Huffman-
tree stuff only.  Numbers so far indicate < 15Kb Malloc use + 32 Kb for
the abovementioned buffer while uncompressing.
1994-10-05 00:58:33 +00:00
Poul-Henning Kamp
0c99df0d8d Added M_GZIP for the imgact_gzip code. The gzip-code is likely to be used
for other weird things in the future (hint, hint!)
1994-10-04 06:51:42 +00:00
Poul-Henning Kamp
4efda9261d Based on the applause (in this case: not downright rejection :-) I have
cleaned up much of the cruft in this thing.

No printf's in the case where things go well.

Gzip-headers can contain filenames and comments (as long as they're
shorter than the page-size.)

I don't think we leak memory, in the "exec/aout" code.  I'm not quite sure
about the inflate code yet, but I don't think memory is lost.

Q:  Can I add a class M_GZIP to <sys/malloc.h> and bump M_LAST one up
without any thing else needing tweaking ?

Poul-Henning
1994-10-04 03:09:13 +00:00
Poul-Henning Kamp
4dd5a68318 First bug-fix. This this depends on something odd. I am looking at it,
but every now and then it will fail without an explanation :-(
1994-10-03 23:14:48 +00:00
Poul-Henning Kamp
37c32e9f3a ***
WARNING:  THIS MATERIAL MIGHT GO AWAY!
This material needs the core-groups approval to stay here for the 2.0 release.
If the core-group does not concent to this commit, it will be backed out.
***

It is a non-gpl'ed "unzip" which will allow execution of a.out files which
have been sent through "gzip -9".  The idea being saved disk-space.

Just now this code has quality rating:  "working prototype".

To compress a file to be used with this, do it exactly this way:

gzip -9 -v < /bin/FOO > /tmp/FOO
remember to chmod /tmp/FOO as needed.

DON'T compress all of you binaries right away !  There are several things
which you should consider first:

1. Using compressed binaries, you use >MUCH< more VM, and thus swap-space.

2. It is slow.

3. It might crash your machine.

Apart from that, I welcome comments...

NB:  There is also a change to sys/conf/files, but cvs core-dumped on me,
so it didn't get into the logs or emailed, but the commit seems to have
happended OK.
1994-10-03 05:23:01 +00:00