摘要:
Provided is a method of allocating a stack in a multi-threaded sensor operating system environment. The method dynamically allocates as much stack space as is required by a thread, thereby enabling efficient use of stack space. The method includes the steps of: whenever a function is called while a thread is performing an operation, dynamically allocating a stack space to be used by the called function; and when execution of the function is finished, returning the allocated stack space.