增加OS X Lion的堆栈大小 [英] Increase stack size in OS X Lion
本文介绍了增加OS X Lion的堆栈大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为需要大量堆栈的C ++程序执行此操作。我使用g ++(包含在OS X Lion中)编译它。我怎么能为我的程序增加它?
I need to do it for a C++ program that needs a lot of stack. I use g++ (included in OS X Lion) to compile it. How could I increase it for my program?
推荐答案
From http://developer.apple.com/library/mac/#qa/qa1419/_index.html
使用gcc,将链接标志传递给ld并加上-Wl:
Using gcc, pass link flags through to ld with -Wl:
gcc -Wl,-stack_size -Wl,1000000 foo.c
这篇关于增加OS X Lion的堆栈大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文