Hello,
This short program below represents a problem I am having with
segmentation faults in a much larger C program that has numerous
arrays. Seems as though when I increase the number of elements in an
array (here, for example, beyond 130,000) a seg fault occurs.
Any idea on
On Friday 07 May 2004 06:42, Henrik W Lund wrote:
> malloc() is your friend! :-)
>
> --> double *ncost = malloc(sizeof (double) * persons * scens); <--
>
> This ought to do the trick. Just remember to make sure that malloc
> returns a valid pointer, otherwise you'll have another seg fault.
>
>
Malcolm Kay wrote:
On Friday 07 May 2004 06:42, Henrik W Lund wrote:
malloc() is your friend! :-)
--> double *ncost = malloc(sizeof (double) * persons * scens); <--
This ought to do the trick. Just remember to make sure that malloc
returns a valid pointer, otherwise you'll have another seg f
This doesn't have much to do with FreeBSD, but...
On May 6, 2004, at 2:58 PM, Caroline Korves wrote:
Any idea on what I should change to make the program run with large
numbers of elements in my arrays?
Automatic variables get allocated from the stack, which can only grow
to handle 8 MB or so by d
Subject:
segmentation fault-- is my array too long?
From:
"Caroline Korves" <[EMAIL PROTECTED]>
Date:
Thu, 06 May 2004 14:58:43 -0400
To:
[EMAIL PROTECTED]
To:
[EMAIL PROTECTED]
Hello,
This sho
Subject:
segmentation fault-- is my array too long?
From:
"Caroline Korves" <[EMAIL PROTECTED]>
Date:
Thu, 06 May 2004 14:58:43 -0400
To:
[EMAIL PROTECTED]
To:
[EMAIL PROTECTED]
Hello,
This sho