Re: [Patch] 2.5.70-bk11 zlib reduce deflate workspace by 128k

Jörn Engel (joern@wohnheim.fh-wedel.de)
Fri, 6 Jun 2003 18:29:21 +0200


On Fri, 6 June 2003 17:00:43 +0200, art_k@o2.pl wrote:
> Jörn Engel <joern@wohnheim.fh-wedel.de> (030606.160149,<20030606140149.GA20168@wohnheim.fh-wedel.de>):
> > Free lunch time. There are currently no users in the kernel that use
> > a memlevel >8, but we reserve space for 9. The patch saves 128k at no
> > cost.
>
> > /* Maximum value for memLevel in deflateInit2 */
> > #ifndef MAX_MEM_LEVEL
> > -# define MAX_MEM_LEVEL 9
> > +# define MAX_MEM_LEVEL 8
> > #endif
>
> i like the direction this is going, but when making these kind of changes
> it would be even better if the reasoning would be noted in a short comment
> (eg. "/* no users of memlevel>8 in kernel; saves 128k RAM */").
> That way the next person looking at that code would immediately know why
> that number was chosen.

Usually, you would be right. But in this case, the existing comments
in zconf.h match the situation *after* my patch. Looks good to me.

Jörn

-- 
But this is not to say that the main benefit of Linux and other GPL
software is lower-cost. Control is the main benefit--cost is secondary.
-- Bruce Perens
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/