the API is designed in a way of weirdness. People call this API sending integer value to subsystem thru randomly choosed arg by the specific SPI_GETblahblah. Recently I posted MmGrowKernelStack patch to ReactOS. This internal func is for cut down the kernelstack memory. Cause most threads use only KERNEL_STACK_SIZE, only GUI threads require KERNEL_LARGE_STACK_SIZE, and what's been done in NT? From the comments in ReactOS code, we find out that NT actually allocates KERNEL_STACK_SIZE for GUI thread at the very beginning. So the GUI thread would have only KERNEL_STACK_SIZE stack, while it could be not enough, so every call of growing kernel stack which might exhaust kernel stack would call MmGrowKernelStack. More details could be seen in bug 2413.
Sadly, what I did was wrong due to MSDN
最新推荐文章于 2018-03-25 22:21:09 发布
本文介绍了ReactOS项目中关于内核栈调整的工作。通过分析发现,NT在初始化GUI线程时分配较小的堆栈空间,这可能导致内存不足的问题。为解决此问题,提出了MmGrowKernelStack补丁,用于在必要时增加内核栈大小。
1241

被折叠的 条评论
为什么被折叠?



