相关疑难解决方法(0)

在使用GNU编译器编译期间,在Linux中更改C++应用程序的堆栈大小

在OSX C++程序编译期间g++我使用

LD_FLAGS= -Wl,-stack_size,0x100000000
Run Code Online (Sandbox Code Playgroud)

但在SUSE Linux中,我经常遇到如下错误:

x86_64-suse-linux/bin/ld: unrecognized option '--stack'
Run Code Online (Sandbox Code Playgroud)

和类似的.

我知道可以使用

ulimit -s unlimited
Run Code Online (Sandbox Code Playgroud)

但这并不好,因为单个用户并不总能做到这一点.

如何在单个应用程序中使用GCC增加Linux中的堆栈大小?

gcc gnu

43
推荐指数
4
解决办法
8万
查看次数

在OS X上使用Clang进行编译时如何增加堆栈大小?

我可以用clang ++指定堆栈大小吗?我找不到任何允许我这样做的编译器选项.我正在使用OS X.

注意:这个问题具体是指Clang,而不是GCC编译器.

macos ld stack-size compiler-options

13
推荐指数
1
解决办法
6414
查看次数

Analyzing memory mapping of a process with pmap. [stack]

I'm trying to understand how stack works in Linux. I read AMD64 ABI sections about stack and process initialization and it is not clear how the stack should be mapped. Here is the relevant quote (3.4.1):

Stack State

This section describes the machine state that exec (BA_OS) creates for new processes.

and

It is unspecified whether the data and stack segments are initially mapped with execute permissions or not. Applications which need to execute code on the stack or data …

c linux stack mmap linux-kernel

3
推荐指数
1
解决办法
2892
查看次数

标签 统计

c ×1

compiler-options ×1

gcc ×1

gnu ×1

ld ×1

linux ×1

linux-kernel ×1

macos ×1

mmap ×1

stack ×1

stack-size ×1