Re: Segmentation fault from free()
Lei Yang <[email protected]> Tue, 24 Aug 2004 17:25:07 -0400
| Newsgroups | org.kernel.vger.linux-gcc,org.kernel.vger.linux-c-programming |
|---|---|
| Message-ID | <[email protected]> |
Do you mean that something 'free' needs has been destroyed? Why this wouldn't happen with small files? THe memory debugger idea is definitely a good one, I'll try that. Thanks a lot! Lei Robert Schiele wrote: > On Tue, Aug 24, 2004 at 04:34:24PM -0400, Lei Yang wrote: > >>Could anyone please point me out what could possibly be the reason? > > > Cannot say something definitely with incomplete source code. > > The bug is not necessarily in the malloc/free pair of this construct. Likely > you destroyed the heap structure in earlier memory allocation/deallocation > operations (e.g. during list processing). You may want to check your program > with a memory debugger, e.g. valgrind for i386 platform. > > Robert >