hi ,
I am using code warrior 3.0 for my project.
In that i am using fopen functionality.
While debugging , when it enters the first fopen() after my 'int main()', no problem for my application (it works fine).
But at the second time (in a while loop) , when it enters in fopen(), goes to the following function in msc814x_intr_vectors.asm file
;Entry 5 Reserved
jmp>___EmptyIntHandler
dup 29
nop
endm
When i traced the path , i found as ,
from fopen() in my application
to
fopen() in C:\Program Files\Freescale\CodeWarrior\StarCore_Support\compiler\src\rtlib\expanded\fopen_common.c
to
__do_open() in C:\Program Files\Freescale\CodeWarrior\StarCore_Support\compiler\src\rtlib\expanded\fopen_common.c
to
malloc() in C:\Program Files\Freescale\CodeWarrior\StarCore_Support\compiler\src\rtlib\expanded\maloc_common.c
From this malloc() function it is going to the exception (finally stuck ) goes to msc814x_intr_vectors.asmfile
Here am pasting the code stuff of malloc() stuck area (Inside the while() loop )from the maloc_common.c
/* First: attempt to allocate the buffer from the existing pool with a
minimum of wasted space. */
while ( NULL != p )
{
if ( NO == p->used && nbytes <= p->size && waste > ( p->size - nbytes ) ) => throws exception from this area
waste = p->size - nbytes, best_fit = p;
p = p->lnk;
}
I don't know why this happens in the second time when fopen() calls.
Can any one help me out in solving this problem?
This is the whole issue .
/renjith_g