more than 256 Mbyte?

Jens Mortensen morten@prr.mpi-stuttgart.mpg.de
Fri Jul 7 04:20:00 GMT 2000


Hi,

I am using using the g++ compiler on an IBM-POWER2(160MHz) with 1Gbyte
of memory.  I would like to use this Gbyte of memory, but there seems to
be a limit at 256 Mbyte!

The following test.cc program works fine for x=255, but for x=257, it
fails.

test.cc:
----------------------------
int main()
{
    const int x = 255;
    char* c = new char[x * 1024 * 1024];
}
----------------------------

When I try this test on a GNU/linux-PC, I don't have this problem.

This is my g++ version:

$ g++ -v
Reading specs from
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95/specs
gcc version 2.95 19990728 (release)

Any help would be appreciated.
JJ

-- 
-------------Jens-Joergen-Mortensen-------------
  MPI-FKF, Heisenbergstr. 1, D-70506 Stuttgart
      Tel 0711-689-1749, Fax 0711-689-1702
------------------------------------------------


More information about the Gcc-help mailing list