RE: [DEV-C++] BUG: Dev-C 4.9.20 consolprogram has only access to 1MB memory.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-05-10 16:00:30
|
I had written the stack size counting program in asleep mode, that's why
it had logical errors. The correct one:
#include <iostream>
void stack()
{
using namespace std;
static unsigned long counter=0;
char buffer[1024-sizeof(void *)];
counter++;
cout<<"Allocated approximately "<<counter;
cout<<" KB of stack before i die\n";
stack();
}
int main()
{
stack();
}
|