diff options
author | phk <phk@FreeBSD.org> | 1994-10-05 00:58:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-05 00:58:33 +0000 |
commit | 533de3420bd9023d22a42fc73e004ccbcb234a87 (patch) | |
tree | caa9a13b1ff95a884fb43ba75507d23b8b82ed3b /sys/kern/imgact_gzip.c | |
parent | 4e401ed313f2b2b269f99b835a7c9b7a8e42d703 (diff) | |
download | FreeBSD-src-533de3420bd9023d22a42fc73e004ccbcb234a87.zip FreeBSD-src-533de3420bd9023d22a42fc73e004ccbcb234a87.tar.gz |
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.
Diffstat (limited to 'sys/kern/imgact_gzip.c')
-rw-r--r-- | sys/kern/imgact_gzip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c index 8b425a1..6d02127 100644 --- a/sys/kern/imgact_gzip.c +++ b/sys/kern/imgact_gzip.c @@ -7,7 +7,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: imgact_gzip.c,v 1.3 1994/10/04 03:09:13 phk Exp $ + * $Id: imgact_gzip.c,v 1.4 1994/10/04 06:51:42 phk Exp $ * * This module handles execution of a.out files which have been run through * "gzip -9". @@ -91,10 +91,10 @@ exec_gzip_imgact(iparams) return ENOMEM; bzero(gz,sizeof *gz); /* waste of time ? */ - gz->gz_slide = malloc(WSIZE,M_TEMP,M_NOWAIT); - if (!gz->gz_slide) { + error = vm_allocate(kernel_map, &gz->gz_slide, WSIZE, TRUE); + if (error) { free(gz,M_GZIP); - return ENOMEM; + return error; } gz->ip = iparams; @@ -142,7 +142,7 @@ exec_gzip_imgact(iparams) done: error = gz->error; - free(gz->gz_slide,M_TEMP); + vm_deallocate(kernel_map, gz->gz_slide, WSIZE); free(gz,M_GZIP); return error; } |