如何增加c中的堆栈限制? [英] how to increase the stack limit in c?

查看:89
本文介绍了如何增加c中的堆栈限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在编译时遇到解析器堆栈溢出。


请为这个问题提供有价值的解决方案。

Hi,

I am getting parser stack overflow at compile time.

Kindly give ur valuable solutions to this problem.

推荐答案





我在编译时遇到解析器堆栈溢出。


请为这个问题提供有价值的解决方案。
Hi,

I am getting parser stack overflow at compile time.

Kindly give ur valuable solutions to this problem.



我们能看到导致堆栈溢出的代码吗?

Can we see the code causing the stack overflow?


ya因为堆栈限制的增加不在我们手中。 br />

你必须与英特尔的MD和amd谈谈

ya because increase of stack limit is not in our hand.

you have to talk with MDs of intel and amd


我们能否看到导致堆栈溢出的代码?
Can we see the code causing the stack overflow?



ya因为堆栈限制的增加不在我们手中。

你必须与英特尔的MD和amd
讨论
ya because increase of stack limit is not in our hand.

you have to talk with MDs of intel and amd



实际上,这是不正确的。堆栈由程序分配,但设置为默认值。您必须查看编译器或IDE的手册来设置堆栈大小。你也可以在产生一个新线程时设置它,但如果你正在编写单线程应用程序,那就有点矫枉过正了。


如果你需要设置默认堆栈大小的帮助,请说明您正在使用的编译器和IDE(如果有)。有人可能会指出你正确的方向。


也就是说,堆栈对于大多数应用来说通常都足够大,所以你的代码中可能存在无限的递归问题。发布输出说明问题发生的位置,发生这种情况的函数以及可能调用导致错误的函数的函数将允许我们在这方面提供帮助。如果您不知道问题出在哪里,请查看代码中的递归函数并发布它们,我们将看到我们可以做什么。


希望这有助于。


Adrian

Actually, this is not correct. The stack is allocated by the programme, but is set to a default value. You will have to look in the compiler''s or IDE''s manual to set the stack size. You can also set this when spawning a new thread, but is a bit overkill if you are writing a single-threaded app.

If you want help with setting the default stack size, state the compiler and IDE (if any) you are using. Someone may be able to point you in the right direction.

That said, the stack is usually big enough for most apps, so it could be you have a infinite recursion problem in your code. Posting the output stating where the problem is occurring, the function where this is occurring and probably the function that is calling the function that is causing the error would allow us to help in that regard. If you don''t know where the problem is occurring, take a look in your code for recursive functions and post them, and we will see what we can do.

Hope this helps.


Adrian


这篇关于如何增加c中的堆栈限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆