Lengthy arrays and SIGSEGV
Blake Huff
stangmechanic at gmail.com
Fri Dec 16 17:06:29 CET 2005
Hi all:
I'm trying to allocate some integer (mpz_t) arrays with hundreds of
thousands of elements. However, the following code with an
ARRAY_SIZE of 700000 fails, but works with 600000. Changing the
number of bits being allocated doesn't seem to change the outcome.
I've configured the library with --disable-alloca to get around the
stack allocation issue, but I still get a SIGSEGV error from GCC 4.0
on Apple OS 10.4.3. Anyone know if it's possible to get a larger array?
#define ARRAY_SIZE 700000
int main (int argc, const char * argv[]) {
mpz_t test_array[ARRAY_SIZE];
mpz_array_init(test_array[0], ARRAY_SIZE, 32);
return 0;
}
Thanks in advance!
Blake Huff
stangmechanic at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gmplib.org/list-archives/gmp-discuss/attachments/20051216/27eed259/attachment.html
More information about the gmp-discuss
mailing list