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

Out of RAM error, strange?

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



Joined: 30 Apr 2007
Posts: 44

View user's profile Send private message

Out of RAM error, strange?
PostPosted: Fri May 09, 2008 3:07 pm     Reply with quote

Hi
I am writing a program using usb_cdc and my home made FAT32 code, but I'm running out of ram.. I can compile the program at one stage and it tells me that I use 85% of the ram, but if I declare and use a single byte more I get the "Not enough RAM for all variables" error. I think this is strange, there should be 15% ram left, shouldn't it? Or doesn't the compiler count with the memory defined in #reserve?
The compiler version: 4.038
Any help would be thankful.
BW Miniman
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Fri May 09, 2008 4:16 pm     Reply with quote

The program memory is made up of 'pages'. Each page can only hold up to so much information. Even though the 'total' usage is only 85% the page, that holds the section of code you are working on, might be 99% full. When you make that last declaration it could be over-filling that page.

If there is anything you can move out of that area, (made into a separate function), then there might be enough room for you to add other things needed in there.

Ronald
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