lkml.org 
[lkml]   [2006]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[im]proper use of stack?
From
So... I know that there is some small-ish amount of kernel stack space  
available per-process, and the kernel uses this area when executing on a
process's behalf (system call, etc). Let's say I allocate (via an
automatic/stack-based storage) some smallish structure which I want a
kernel thread to populate (or interrupt context... some context other than
my process's context).

If my process gets context swapped, is my kernel-based stack pointer
always valid?

Why use stack-based storage, you ask? Let's pretend this is a
high-frequency call and I don't want to incur the expense of kmalloc'ing
and freeing on every call. I know I have enough stack space, I just don't
know if my stack is always available :)

TIA!
-
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: 2006-10-19 18:25    [W:0.266 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site