[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

Maximum value to assign to _stklen

What is the maximum value you can assign to _stklen ?

I am currently assigning 48kb. Would there be a problem
in assigning 64k + ?

Thanks for your help,

James Atkin
0
James Atkin
Asked:
James Atkin
1 Solution
 
Tommy HuiCommented:
It sounds like you're programming in 16bits. If that's the case, then the size of your global data (initialized or not) + the size of your stack + (if you're doing Windows local heap) <= 64K.

So you can assign it up to approximately 60K (provided you are not compiling for 16-bit Windows and no global data). But you definitely cannot go over 64K. You'll get an error from the linker.

If you're using 32bits, then assigning _stklen does not do anything. You'll have to change the size of the stack using a module definition file.
0
 
James AtkinSenior Principle Software EngineerAuthor Commented:
I am developing a 16-bit DOS application, with several MALLOC commands.

Providing I keep the varaible declarations < 64kb, do I need the _stklen declaration ?

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now