lkml.org 
[lkml]   [2002]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kernel Stack Limit...
From
Date
On Thu, 2002-08-29 at 15:07, Raj, Ashok wrote:

> Please reply to me, since i dont have this email id on the list.
>
> Could someone tell me at what the kernel stack size limit is?

It depends on the architecture. 8KB for x86 and most others. Some
(all?) 64-bit platforms have 16KB stacks.

Note the effective size is actually (8KB - sizeof(task_struct)) in 2.4
and (8KB - sizeof(thread_info)) in 2.5 since those structures are stored
at the top of the stack.

Also note interrupts share the stack.

> Is there a gcc option for x86 that can warn if too large variables are
> specified in the stack?

I believe 2.4-ac has a stack overflow check in it... as does the RedHat
kernel - check it out.

Also kgdb (or at least our copy here at MontaVista) has a stack overflow
check.

Robert Love

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.026 / U:1.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site