Re: [PATCH 2/9] arm: do not place huge encoder tables on stack when it is too small

Paul Osmialowski
2015-06-24T07:17:18Z

Hi Geert,

You're right. To be removed. Thanks for spotting this.

On Wed, 24 Jun 2015, Geert Uytterhoeven wrote:

> On Tue, Jun 23, 2015 at 11:19 PM, Paul Osmialowski <pawelo@king.net.pl> wrote:
>> Since stack on Cortex-M3 is too small, we need configuration option
>> to avoid using it for huge encoder tables of zlib.
>>
>> Signed-off-by: Paul Osmialowski <pawelo@king.net.pl>
>
>> --- a/lib/zlib_inflate/inflate.c
>> +++ b/lib/zlib_inflate/inflate.c
>> @@ -75,9 +75,14 @@ int zlib_inflateInit2(z_streamp strm, int windowBits)
>> Return state with length and distance decoding tables and index sizes set to
>> fixed code decoding. This returns fixed tables from inffixed.h.
>> */
>> +#ifdef CONFIG_ZLIB_INFLATE_STACK_SAVING
>> +# include "inffixed.h"
>> +#endif
>> static void zlib_fixedtables(struct inflate_state *state)
>> {
>> +#ifndef CONFIG_ZLIB_INFLATE_STACK_SAVING
>> # include "inffixed.h"
>
> All variables in inffixed.h are "static const", so they are not on the stack
> anyway, and this patch shouldn't make a difference.
>
>> +#endif
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>