User forums > Using Code::Blocks

stack size

<< < (2/3) > >>

Hi all,

Trying to increase stack size for example with "-Wl --stack,1024" from linker or compiler options in Code Block didn't work for me. Is anyone know solution of this problem by using IDE?



--- Quote from: hokselato on May 13, 2012, 05:38:14 pm ---for example with "-Wl --stack,1024"

--- End quote ---
That is wrong. Instead of "-Wl --stack,1024", use "-Wl,--stack,1024" (notice the comma).

Thanks for reply,

Sorry for typo. I tried your suggestion but at compile time a blue warnings says unused linker option and end of compile this message disappears. This option is not working. Do you have any alternate advice to increase stack size? I will use my code at an embedded platform so I dont want to use malloc. All my memory allocations must be at stack.

My linker option is (and I also tried it  as compiler option)


Compiler Warning is;

Compiling: FFT_anysize.c
mingw32-gcc.exe: --stack: linker input file unused because linking not done
mingw32-gcc.exe: 528000000: linker input file unused because linking not done



--- Quote from: hokselato on May 14, 2012, 08:57:44 am ---Compiler Warning is;

--- End quote ---
Why don't you simply look up, for example here:
This is a Code::Blocks, not a compiler/linker related forum. You should better ask this question in a forum related to the compiler you are using, e.g. GCC mailing list. It may heavily depend on the platform and version you are using - and for such stuff, you should better ask compiler people, see here:

--- Quote -----stack reserve
--stack reserve,commit
    Specify the amount of memory to reserve (and optionally commit) to be used as stack for this program. The default is 2Mb reserved, 4K committed. [This option is specific to the i386 PE targeted port of the linker]
--- End quote ---

An advice for this action would be to also rebuild the program (Build->Rebuild).
I tried typing "-Wl --stack,1024" and after I have rebuilt the program, the stack size was indeed changed.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version