i get a segmentation fault
I've tried to do some print on screen to understand why
as it seems it occurs while trying to run a FreedVector(curs->point,3);
and it is not possible to print out that vector point even if curs is not a NULL pointer
Printable View
So that node apparently doesn't have a point vector? Is that expected? If so, you'll have to deal with that. If not, you should check that you didn't forget to do so?
it is not expected and it shouldn't be possible
the vector point is the information of the node without that the node shouldn't even exist
edit
and I find quite strange that if there is no point vector in that node I don't get an error previously in the program while trying to use that vector that don't exist
some news, I don't know if good or bad ones
as it seems if I change the input file to an easier one, it works
or at least it does not give me the segmentation fault
so it might be a problem in the allocation rather than in freeing the memory, am I wrong?
edit
there is a way to check if the memory is freed for real? (to check if the function actually works)
That's not quite enough information to tell us what C library you are using, and as it's unique to each C library, we can't tell.
Alternatively, you could make your own malloc/free replacement functions that keep track of how much you've allocated and how much you've freed.
--
Mats
as I've said I have no idea what compiler it is, I just have a file with the command
and that's all I know about how I compile itCode:cc -g namefile.c ./lib/sol/*.o -lm -o namefile
about UNIX it should be (actually I'm using it remotely with X-Win32) Solaris OS (if that was the question)
Maybe this page (I didn't actually read much of it) will help:
http://developers.sun.com/solaris/ar...m_library.html
--
Mats
I'll have a look, thanks