changeset 1421:170fbc1a5bbc

Clean up memory pool initialization
author gthomas
date Fri, 05 Dec 2003 15:10:52 +0000
parents 9721661d7ecc
children d5f61a251ca3
files packages/redboot/current/ChangeLog packages/redboot/current/src/decompress.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-05  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/decompress.c (gzip_init): Memory pool initialization should
+	only be done in _zlib_init().
+
 2003-12-05  Ian Campbell  <icampbell@arcom.com>
 
 	* src/decompress.c: Ensure that free'd blocks are returned to the
--- a/packages/redboot/current/src/decompress.c
+++ b/packages/redboot/current/src/decompress.c
@@ -230,12 +230,9 @@ static int
 gzip_init(_pipe_t* p)
 {
     int err;
-    struct _block *bp;
 
-    bp = (struct _block *)zlib_workspace;
-    memlist = bp;
-    bp->next = bp->prev = 0;
-    bp->size = ZLIB_COMPRESSION_OVERHEAD;
+    // Note: this code used to [re]initialize the memory pool used
+    // by zlib.  This is now done in _zlib_init(), but only once.
     stream.zalloc = zcalloc;
     stream.zfree = zcfree;
     stream.next_in = NULL;