Any suggestions would be appreciated as to why the seg faults occur or
how they can be controlled.
Thanks,
kristan
--
================================================================================
Kristan Markey k_ma...@coloradocollege.edu
WB #826 Barnes 323
Colorado Springs, CO 80946 Colorado College
(719) 389 7366 (719) 389 6746
Join me in supporting the thermodynmic death of the universe!
================================================================================
Paul Lutus
Kristan Markey wrote in message <365777F2...@ColoradoCollege.edu>...
> Hi,
> I am attempting to get a program running which does a bit a input/output
> and a small amount of work with arrays and matrices. However, the
> program does not like certain free() and fclose() calls; it gives me
> segmentation faults. The pointers are all cast and declared correctly,
> they work sometimes, but as soon as one is fixed, another pops up later
> in the program. In order to use some older code, I need to do pointer
> arithmetic for consistent indicing.
>
> Any suggestions would be appreciated as to why the seg faults occur or
> how they can be controlled.
> Thanks,
> kristan
<Jack>
You have memory problems in your code, most likely writing past the end of
allocated memory. This trashes the information maintained by the memory
allocation functions.
</Jack>
>I am attempting to get a program running which does a bit a input/output
>and a small amount of work with arrays and matrices. However, the
>program does not like certain free() and fclose() calls; it gives me
>segmentation faults. The pointers are all cast and declared correctly,
>they work sometimes, but as soon as one is fixed, another pops up later
>in the program. In order to use some older code, I need to do pointer
>arithmetic for consistent indicing.
Show us the code. We can't say what could be happening with any
confidence if we don't know what you're doing. Having said that, I
might speculate the possibility that you have incremented a pointer
then passed that pointer to free(), or something like that.
--
----- Dig the EVEN NEWER, MORE IMPROVED news sig!! -----
-------------- Shaggy was here! ---------------
http://aardvark.apana.org.au/~phaywood/
============= Ain't I'm a dawg!! ==============