This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc and free


On Fri, 2004-12-24 at 18:40 +0000, Ankit Jain wrote:
> hi
> 
> routine xyz uses malloc and free functions. it gives
> accurate and correct result if called once. 
> 
> but if the function is called in a loop N number of
> times then probably it gives segmentation fault.
> 
> what is the reason?  can any body guess or test code
> is needed?

If you are using Linux X86 try the code under valgrind.

You could also compile your code with -g and run it under gdb.

Otherwise your question is so vague it is impossible to work out how to
help you.

-- 
Ken Foskey
OpenOffice.org developer



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]