dynamic allocate memory in my application?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dynamic allocate memory in my application?

1,161 Views
jixiang
Contributor I
Hello,
 
My application C programs run on either RAM or Flash Programmer using M52223 controller and CodeWarrior 6.3. In my C code, I just try to use standard C lib: calloc(..) and malloc(..) to dynamically allocate memory for diffrent variables.  I get an error message: "Bus Error ..."  
 
I would appreciate it if someone can help or give the direction to solve the problem.
 
Thanks
 
Dong Sun
 
 
Labels (1)
0 Kudos
1 Reply

304 Views
CrasyCat
Specialist III
Hello
 
  1- Did you include stdlib.h in the source file where you try to use calloc?
  2- Where did you define your heap? How big is it defined? You should be able to see that in
      the .map file generated by the linker
 
CrasyCat
0 Kudos