This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ alloca() problem on Tru64 UNIX
- From: Shivaraja Gowda <SGowda at orga-systems dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: Shivaraja Gowda <SGowda at orga-systems dot com>
- Date: Thu, 6 Nov 2003 17:20:48 +0100
- Subject: g++ alloca() problem on Tru64 UNIX
Hello,
g++ alloca() function does not seem to respect #pragma intrinsic(alloca) on Tru64 UNIX.
It eats up all the available memory... here is the reproducer..
$ sizer -v
Compaq Tru64 UNIX V5.1A (Rev. 1885); Thu Aug 21 17:07:50 CEST 2003
$ cat alloca.c
#include <alloca.h>
void f (void) {
char *data=(char*)alloca(8192);
}
int main (int ac, char **av)
{
while (1) {
f();
}
}
$ g++ --version
g++ (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ -o alloca alloca.c
$ ./alloca
[ eats all the available memory... ]
thank you!
//Shiva