Guennadi Liakhovetski <gl@dsa-ac.de> [2003-09-12 11:21]: > > IIRC, user-space application stack can grow dynamically, right? Now, if > this is so, what happens in ENOMEM? Say, in a function, I can either > explicitly malloc(), or I can have a local char buf[...]. Will the app > just sleep "forever" waiting for RAM to become available? > it's questionable whether malloc() allocates buffer on stack. I've always thought it was on heap. if you have int foo() { char buffer[XYZ]; } buffer would be on stack. Stack size can be calculated at compile-time. ENOMEM should never be returned there IIRC. 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/