lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


A more primitive approach that I use is to pepper my code with calls to
_CrtCheckMemory(), which checks the debug heap for a few types of memory
corruption.

It can help pinpoint the area of code where and the time when the
corruption occurs.

_CrtCheckMemory() is part of the debug runtime libs with visual studio,
but I would think that Metrowerks has something similar.

-Kevin

> 
> > We have been chasing a really bizarre bug all day.
> 
> >free (crashes in here in the pool manager of MSL by Metrowerks)
> 
> Those symptoms point to memory corruption. You should try a good
> memory-access checker (purify, valgrind, eletric-fence?).
> 
> 
> > I can get rid of the bug by slowly eliminating lines of lua 
> source code
> > until I can get it down to a single ascii character is the 
> reason for
> > the crash.
> 
> Small changes like that change the pace of the garbage 
> collector, which
> in turn changes all the allocation pattern of your program.
> 
> -- Roberto
>