|
From: Benjamin L. <ben...@us...> - 2003-09-07 07:58:18
|
Your *normal* free() implementation sounds like it is non-ANSI C and non-POSIX compliant. Are you overriding it somewhere or using a malloc checking library? http://www.opengroup.org/onlinepubs/007904975/functions/free.html Can you supply details of your operating system, C library, compiler etc. and all that jazz? On Sunday, 2003-09-07 at 01:54:19 PM, Gong Cheng scribbled: > I have a wired bug > > the code is like this > > > printf("%d",i); > free(j); > printf("%d",i); > > if we suppose i =1 ,the result should be > 1 > 1 > but in reality, the result is > 1 > 0 > > The interesting thing is that if I use valgrind to run the program, > the result turn back to > 1 > 1 > > anybody know what's the difference between normal free and the free in > valgrind? > > Thanks a lot! > > Gong > -- Benjamin Lee Melbourne, Australia "Always real." http://www.realthought.net/ __________________________________________________________________________ Before destruction a man's heart is haughty, but humility goes before honour. -- Psalms 18:12 |