[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
large stack variables in shttpd
- Date: Tue, 31 Jul 2007 10:32:20 -0700
- From: aaron at frye.com (Aaron J. Grier)
- Subject: large stack variables in shttpd
On Tue, Jul 31, 2007 at 10:19:14AM -0500, Joel Sherrill wrote:
> In building for the avr and h8300, there were errors building. When I
> investigated, I came across this in shttpd:
>
> defs.h:#define URI_MAX 32768 /* Maximum URI size */
> log.c: char date[64], buf[URI_MAX];
> log.c: char date[64], buf[URI_MAX], *q1 = "\"", *q2 = "\"";
> shttpd.c: char path[URI_MAX], buf[1024];
>
> So there are 3 places where shttpd puts 32K on the
> stack. Two are for logging.
>
> Any thoughts on what to do?
move them out of the function and declare them static; that should at
least put them in .bss. or cut down URI_MAX to something more
reasonable.
AVR == AVR32, I assume? or is RTEMS running on 8bit AVR now?
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com