Static/global variables are allocated from the heap. Dynamic variables
(like the "b" array in your code) are pushed on the stack.
Either use compiler directives to increase stack space or make both arrays
static.
This is not a FreeDOS problem and should not have been posted to this list.
Bruce
>> asking programming errors on a mailing list that is focused on
>> operating system development is considered BAD.
> I don't think we have enough developers (OS or application) or enough
> list traffic where we can afford to be picky ...
this is stillnot the 'programming for dummies' mailing l
> At 12:58 PM 12/20/2012, Louis Santillan wrote:
>>The Memory Model (Tiny vs. Small vs. Compact vs. Medium vs. Large,
>>.COM vs. .EXE) of the compiler could be causing the issue. Some
>>compilers used to default to Small. What compiler flags are you using?
> Even in the TINY model, there is no
On 12/20/2012 3:11 PM, Ralf A. Quint wrote:
> At 12:58 PM 12/20/2012, Louis Santillan wrote:
>> The Memory Model (Tiny vs. Small vs. Compact vs. Medium vs. Large,
>> .COM vs. .EXE) of the compiler could be causing the issue. Some
>> compilers used to default to Small. What compiler flags are you u
On 12/20/2012 2:41 PM, Tom Ehlert wrote:
> asking programming errors on a mailing list that is focused on
> operating system development is considered BAD.
>
I don't think we have enough developers (OS or application) or enough
list traffic where we can afford to be picky ...
Mike
--
At 12:58 PM 12/20/2012, Louis Santillan wrote:
>The Memory Model (Tiny vs. Small vs. Compact vs. Medium vs. Large,
>.COM vs. .EXE) of the compiler could be causing the issue. Some
>compilers used to default to Small. What compiler flags are you using?
Even in the TINY model, there is no reason
The Memory Model (Tiny vs. Small vs. Compact vs. Medium vs. Large, .COM vs.
.EXE) of the compiler could be causing the issue. Some compilers used to
default to Small. What compiler flags are you using?
-L
On Thu, Dec 20, 2012 at 12:47 PM, Rugxulo wrote:
> Hi,
>
> On Thu, Dec 20, 2012 at 2:28
Hi,
On Thu, Dec 20, 2012 at 2:28 PM, Santiago Almenara wrote:
>
> Where can I find the default size for the watcom stack?
Dunno. I think it used to be 4 kb for 16-bit targets, but they may??
have increased it to 16 kb in the meantime.
http://www.openwatcom.com/index.php/C_Compilers_Release_Chan
> Hello list:
asking programming errors on a mailing list that is focused on
operating system development is considered BAD.
> I am having Stack Overflow problems with this simple code under FreeDOS and
> OpenWatcom:
> #include
> char a[8192];
> int main()
> {
> int i;
> char b[8192];
Michael:
Where can I find the default size for the watcom stack?
If you use "stack=4096", it means the default stack size might be much
smaller than the 16384 I am using.
Santiago
On Thu, Dec 20, 2012 at 2:42 PM, Michael B. Brutman
wrote:
>
> First, the good news - Watcom includes code at th
First, the good news - Watcom includes code at the start and end of each
function to detect stack overflows. It is a lot easier to debug code
when you know what the root cause of the problem is. If the stack
overflow were to happen and remain silent, you could have all sorts of
strange behavi
AFAIK when you use static tables they are allocated on the stack.
You might want to try allocating them on the heap...
To do so, simply use malloc().
char *a;
a = malloc(8192);
if (a == NULL) return(1);
/* do your stuff */
free(a);
return(0);
cheers,
Mateusz
On 12/20/2012 07:24 P
wouldnt using memset() be better ?
On Dec 20, 2012, at 10:24 AM, Santiago Almenara wrote:
> Hello list:
>
> I am having Stack Overflow problems with this simple code under FreeDOS and
> OpenWatcom:
>
> #include
>
> char a[8192];
>
> int main()
> {
> int i;
> char b[8192];
>
Hello list:
I am having Stack Overflow problems with this simple code under FreeDOS and
OpenWatcom:
#include
char a[8192];
int main()
{
int i;
char b[8192];
for(i=0; i<8192; i++) a[i]=b[i]=0;
return 0;
}
I keep getting stack overflow problems.
I know this code is very simple
14 matches
Mail list logo