CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

running out of RAM?!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ye



Joined: 11 May 2005
Posts: 57
Location: london

View user's profile Send private message

running out of RAM?!
PostPosted: Wed Sep 28, 2005 4:40 am     Reply with quote

Hi everybody,

I am using 18f8722 but due to the massive size of the code, I am running out of RAM....


ROM used: 50186 bytes (38%)
Largest free fragment is 65536
RAM used: 2834 (74%) at main() level
3104 (81%) worst case
Stack: 8 worst case (7 in main + 1 for interrupts)


Can anybody give any indications what else could cause a huge RAM usage besides too many variables?

Whether or not by looking at the LIST file, is there any way to find out which part of the code is eatting significant amount of RAM?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 28, 2005 6:26 am     Reply with quote

Code doesn't really use up RAM. The compiler does use temporary variables but they are not going to account for a "huge" amount. Strings, arrays, static and global variables are your most likely canidates.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Sep 28, 2005 7:35 am     Reply with quote

Try to avoid using large data types such as floats. I find most floats could be scaled integers instead. People assume they need floats if they are using trig etc. but with a little though it is not so.
_________________
The search for better is endless. Instead simply find very good and get the job done.
dyeatman



Joined: 06 Sep 2003
Posts: 1929
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Sep 28, 2005 10:52 am     Reply with quote

Have you looked at the memory map to see what is using all the memory?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group