stack size during linking time

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

stack size during linking time

532件の閲覧回数
grzegorzK
Contributor III

Hi all

 

I wonder if is possible to get a stack size in "c" module during linking time? I am using FreeScale compiler.

e.g.:

 

================================

extern unsigned __stack_size;

 

unsigned stack_size()

{

 return  __stack_size;

}

=====================================

 

I was looking in linker map file, but seems there is not any object connected with stack size, only with top of stack.

Any clue?

 

/Regards

ラベル(1)
0 件の賞賛
2 返答(返信)

311件の閲覧回数
kef
Specialist I

Try searching online help for __SEG_SIZE_SSTACK

 

extern int __SEG_SIZE_SSTACK[];
int a;

 

{

   a = (int)__SEG_SIZE_SSTACK;

}

0 件の賞賛

311件の閲覧回数
grzegorzK
Contributor III

Exactly what I needed...

Cheers!

0 件の賞賛