Mail Archives: cygwin/1998/11/25/10:58:07
"Joel Anderson" <joela AT umn DOT edu> writes:
> Overall I really,really like this package! (OTOH plain text man pages, or a
> simple man tool would REALLY be good....) But I have a small problem. A si
> mple tool I wrote that works find on Unix is blowing up in free():
Usually a sign of buggy code more often than anything else. There are very
good memory debuggers that a programmer should use before looking further.
>
> Any thoughts:
A few.
> for (x=0;x<wcount;x++){
> free(voc[x][ENG]);
> free(voc[x][GAL]);
> }
Are these uninitialized the first time through? If so, you can't simply
"free" the pointers.
> /* printf ("G: >%s< / E: >%s<\n",g,e);*/
> ecop = (char*)malloc(strlen(e));
> gcop = (char*)malloc(strlen(g));
This is a good candidate for for memory corruption. If you don't know why,
then it's a good time to learn the basics of C character string routines
and memory allocation.
Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -