stack size during linking time

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

stack size during linking time

1,073 次查看
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 回复数

852 次查看
kef
Specialist I

Try searching online help for __SEG_SIZE_SSTACK

 

extern int __SEG_SIZE_SSTACK[];
int a;

 

{

   a = (int)__SEG_SIZE_SSTACK;

}

0 项奖励
回复

852 次查看
grzegorzK
Contributor III

Exactly what I needed...

Cheers!

0 项奖励
回复