[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PuTTY Trouble
- To: Development Discussions <developer at arabeyes dot org>
- Subject: Re: PuTTY Trouble
- From: Kamal Dalal <kamal at banoora dot net>
- Date: Sun, 28 Mar 2004 21:17:49 +0200
- User-agent: Mozilla Thunderbird 0.5 (X11/20040304)
ahmad khalifa wrote:
ok, now im almost finished...
just having some trouble with some realloc()s...
any hints ?
doing reallocs on terminal resize... reallocing a smaller buffer is ok,
but reallocing a bigger buffer gives me some assertion failure about
the mem block not being of the right type...
anyone know anything about that ?
btw, free() then malloc() does the same thing...
btw2, reallocing occurs when i resize the terminal window...
This can happen if the program is writing to memory that was not
allocated to it. Usually memory management functions allocate a buffer
and pad it with some signature. When this buffer is given back to free
or realloc they check the signature to make sure that the program did
not write to a region that is outside of the buffer size. If it finds
that the signature is bad then it fires an assertion. Make sure that the
program does not right outside the range of an allocated buffer.
Such problems are difficult to debug since the problem is detected after
it has actually happened (at the point of free or realloc). Good luck!
Hope this helps.