aditya3524
aditya3524

Reputation: 185

use no heap in gnu gcc

Is there any compiler option or a method to tell gnu gcc not to use heap?
Like for example in armcc : IMPORT __use_no_heap OR #pragma import(__use_no_heap) can be used in the file to tell the armcc not to use heap. I am looking for something similar in gnu gcc.

Upvotes: 0

Views: 2371

Answers (1)

Saswat Padhi
Saswat Padhi

Reputation: 6552

You can set heap size in GCC like this:

gcc -Wl,--heap=<size in bytes>

You can set it to zero if you want.

Upvotes: 1

Related Questions