vc++2010分配堆栈空间无效?
下面是一段masm程序,照理说程序中的.stack为4GB加上设置vc的链接器分配堆栈空间大小4GB应该能使程序不断占用内存空间直到无内存可用为止,为何实际运行中程序用了1500kb就停止了?
.386
.model flat,stdcall
.stack 0ffffffffh ;这里分配堆栈为4GB
ExitProcess proto,ExitCode:dword
Endless proto
WriteString proto
.data
endlessStr byte "This recursion never stops",0
.code
main PROC
call Endless
INVOKE ExitProcess, 0
main ENDP
Endless PROC
mov edx,offset endlessStr
call WriteString
call Endless
ret ; never reaches this line
Endless ENDP
END main
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你打开View problem details 看看没有 ,你这种情况开了Debug 有问题就爆出来了