This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RAM-Memory counter for C programmes


Hello!


Having  programmed  an  AVR-microcontroller  which  is  set  up  in  a Harvard
architecture my programme runs out of RAM-memory (the stack  seems  to  colide
with  data). Now I wonder if there is something like a RAM-memory counter that
analyses the code and calulates the RAM useage of  the  programme  considering
also     the     stack     size.     I     found     something     for    java
(http://www.javaspecialists.eu/archive/Issue142.html) but not for C.  I  think
it  would  depend  on  the  code  if  such a calulation or estimation would be
possible at all but for  programmes  not  dynamically  allocating  memory  and
having  a  fixed  maximum  number of called functions this should be possible,
shouldn't it?

Other thing I wonder is if a Harvard architecture can crash  at  all.  Getting
stuck  in  an  infinit loop if data  and stack colide is possible of corse but
changed behavior of the code should not happen, or am I wrong here?


Thanks
Lynx




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]