Hello,
I have a "std::bad_alloc " problem when I try to run a simple C++ program on HP-UX. I don't know if it is a memory limitation or maybe a compiler option that I should use. When my program reaches 700M, it aborts.
I'm using gcc to compile.
This is the source:
Do you have any idea on how to solve it?
Thanks in advance.
I have a "std::bad_alloc " problem when I try to run a simple C++ program on HP-UX. I don't know if it is a memory limitation or maybe a compiler option that I should use. When my program reaches 700M, it aborts.
I'm using gcc to compile.
This is the source:
Code:
#include <stdio.h>
#include <unistd.h>
#include <malloc.h>
int main(int argc, char* argv[] )
{
int tam=744488960
char * c = new char[tam];
for (int i=0; i<tam-1; i++)
c[i]= 32;
return 0;
}
Thanks in advance.
Comment