Go to Post IT'S LIKE FIRSTmas CAME EARLY THIS YEAR!!! THANKS VEXPro! - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-07-2009, 07:34
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
EasyC Pro variable memory used

How can you tell in EasyC Pro how much variable space has been used and especially how much is left?
__________________
Doug Leppard
  #2   Spotlight this post!  
Unread 11-07-2009, 11:49
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: EasyC Pro variable memory used

Many have asked the same question, and from what I can tell, they've all gotten no reply. All I can tell you is that the VEX micorcontroller has 1800+1024 bytes of EEPROM (electrically erasable programmable read only memory) variable space (total of 2824 bytes for those of you who just woke up or are reading this late at night). It's about 2.5 KB, out of 32 KB of program memory. If you're using that much variable space, that means you have 2824 static unsigned char'ss going at the same time. It would be 1882 static short's, 1412 static int's, 1129 static long's, or 941 static long long's. Even with the WPILib API consuming some of the variable space, I seriously doubt that any program you're going to write will come anywhere close to that. And remember, that's just for static variables. When you have regular variables, each one is constructed and destructed with the function call, so whenever you call a different function, the variables that went with the last function called are no longer there, freeing up variable space. I think you're fine.
  #3   Spotlight this post!  
Unread 11-07-2009, 12:43
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: EasyC Pro variable memory used

That was very helpful. I had no idea how close and what wpi and api were using.

I do know that I have filled up all the cable slots and the program memory is at 29k. I just didn't want to be surprised by running our of variable space.

I suppose I could make up a couple of arrays and see when it fills up. Not even sure what kind of error you get.

So I guess I won't worry about it now.
__________________
Doug Leppard
  #4   Spotlight this post!  
Unread 12-07-2009, 13:22
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: EasyC Pro variable memory used

Quote:
Originally Posted by Doug Leppard View Post
Not even sure what kind of error you get.
At compile time you get an out of memory error, and if you are malloc'ing you will get a null pointer.
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY

Last edited by Uberbots : 12-07-2009 at 13:22. Reason: da comma king
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EasyC Pro Programming? Gizmo2417 General Forum 6 04-02-2008 01:08
Variable assignment in EasyC Hieb Programming 1 31-01-2008 13:42
MS Vista/EasyC & EasyC Pro rswsmay Programming 1 25-04-2007 10:47
EasyC Pro trial? Stuart Programming 3 07-02-2007 22:33


All times are GMT -5. The time now is 01:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi