Linux Stack Sizes

后端 未结 3 417
余生分开走
余生分开走 2020-12-01 03:02

I\'m looking for a good description of stacks within the linux kernel, but I\'m finding it surprisingly difficult to find anything useful.

I know that stacks are lim

3条回答
  •  失恋的感觉
    2020-12-01 03:14

    For processes, you can control the stack size of processes via ulimit command (-s option). For threads, the default stack size varies a lot, but you can control it via a call to pthread_attr_setstacksize() (assuming you are using pthreads).

    As for the interrupt using the userland stack, I somewhat doubt it, as accessing userland memory is a kind of a hassle from the kernel, especially from an interrupt routine. But I don't know for sure.

提交回复
热议问题