-
Urgent question!!!
Hello everyone!
This is for a project that I am currently working on:
Compiler: GCC
OS: Sun Solaris 5.6 (Unix)
What is the maximum size of an array?
Code:
const maxArray = 10 meg ?? 50 meg??
int b[maxArray]
I am also using: malloc => i am sure that amount is reserved.
One side effect though, the program crashes more frequently than before.
Thnx!
-
the theoratical maximum depends on stack size. I don't know for Unix, but for windows the default is 1 MB (you can override this). But if you use up the whole MB, nothing else can be done - function calls, other stack variables etc. will cause your program to crash.
malloc can reserve more space.
-
thnx...
But i figured it out when i was at work..
the program runs "smoothly" now (with some minor adjustments)
thnx anyway