Sadly, what I did was wrong due to MSDN

本文介绍了ReactOS项目中关于内核栈调整的工作。通过分析发现,NT在初始化GUI线程时分配较小的堆栈空间,这可能导致内存不足的问题。为解决此问题,提出了MmGrowKernelStack补丁,用于在必要时增加内核栈大小。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值