-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTKSIZ64.C
28 lines (25 loc) · 1.2 KB
/
STKSIZ64.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
This is the stack size definition file coming with the Aztec-C.
Here is the modified version of it.
Stack sizes made bigger by A.K. 64K for large data and 16K for
small data memory model.
*/
#if sizeof(char *) == 4
int _STKSIZ = 65536L/16; /* (in paragraphs) (large data model) */
int _STKRED = 1024; /* size of RED zone (in bytes) */
#else
int _STKSIZ = 16384/16; /* (in paragraphs) */
int _STKRED = 2048; /* size of RED zone (in bytes) */
#endif
int _HEAPSIZ = 4096/16; /* (in paragraphs) */
int _STKLOW = 0; /* default is stack above heap (small only) */
/*
NOTE: The RED zone is used for stack safety checking. With stack above heap,
the heap will not be allowed to get within STKRED bytes of the current value
of the SP, if limit checking is enabled (see the cc +b option), SP isn't
allowed any closer than STKRED bytes to the top of the heap. If stack below
heap and limit checking is enabled, SP isn't allowed any closer than STKRED
bytes to _Utop. Minimum stack size = 2*_STKRED. Minimum value for STKRED
should be about 256 bytes. This allows some margin to issue DOS calls and
allow interrupt handlers to execute. (Some people think that this should
be > 1k.) */