[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <463F712F.90902@zytor.com>
Date: Mon, 07 May 2007 11:34:23 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
CC: Andrew Morton <akpm@...ux-foundation.org>, Andi Kleen <ak@...e.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Matt Mackall <mpm@...enic.com>
Subject: Re: [PATCH] deflate inflate_dynamic too
Jeremy Fitzhardinge wrote:
> inflate_dynamic() has piggy stack usage too, so heap allocate it too.
> I'm not sure it actually gets used, but it shows up large in "make
> checkstack".
It might be worth reverting some of the code back to the zlib original.
The use of stack allocations here is actually a Linux divergence from
zlib (done by Linus), in order to reduce the number of dynamic allocations.
In general, the use of dynamic allocations is highly dangerous, because
any time you have dynamic allocations you have the choice of either
sleeping or failing, unless you have a pre-reserved memory pool.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists