This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: malloc error.. i can't find the reason why.
- From: Baurzhan Ismagulov <ibr at radix50 dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 2 Mar 2009 15:26:36 +0100
- Subject: Re: malloc error.. i can't find the reason why.
- References: <49AB766C.10100@eg.zdrv.com>
Hello Yim,
On Mon, Mar 02, 2009 at 03:02:20PM +0900, Yim Jae Hyoung wrote:
> sometimes malloc can't operate totally.(it cannot return correct
> assigned address against my function calls)
...
> once malloc cannot return assigned address, it never return correct
> address before we will power off the board and reload it.
This often happens when the application writes to areas it doesn't own
(e.g., allocates 10 bytes and writes 11). Depending on your situation,
you may find the problem through reading the code (which may be very
time-consuming), or through using tools (google for "memory debugging").
If you are not sure how to proceed, you'll need to give some details
about your setup -- do you have an OS, if yes, which one, which C
run-time library you are using, which memory debugging features it
offers, what other debugging tools you have, is your application or a
relevant part of it portable to Linux (this would be ideal) or Windows
-- perhaps anyone on the list has some clue.
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/