Solved

Maximum value to assign to _stklen

Posted on 1997-08-08
2
373 Views
Last Modified: 2012-06-27
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
Comment
Question by:jatkin
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1253004
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
 
LVL 4

Author Comment

by:jatkin
ID: 1253005
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now