Re: userspace-app stack - dynamic?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guennadi Liakhovetski <gl@dsa-ac.de> [2003-09-12 17:11]:
> 
> Wait, no, don't think so. buffer above has scope local to foo(){}, so, it
> should be allocated on stack only when we are in this function. So, you
> can't know exactly how deep on the stack you are at this moment at compile
> time. So, this allocation should be resolved at run-time. IIRC, task stack
> can be grown dynamically by the kernel at run-time - of course, if there
> is space... If not?...
> 

2.4.21:
./include/linux/sched.h: 
/*
 * Limit the stack by to some sane default: root can always
 * increase this limit if needed..  8MB seems reasonable.
 */
#define _STK_LIM  (8*1024*1024)

a way to address: 

man 3 ulimit
man bash 
  and in there:
  / ulimit

btw, I would consider allocating 8 mega bytes on the stack not very good 
programming style....

wbr,
Lukas
-- 
Lukas Ruf           | Wanna know anything about raw |
<http://www.lpr.ch> | IP?  <http://www.rawip.org>   |
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux