To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1436
1435  |  1437
Subject: 
Memory Usage
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 14 Oct 2000 05:34:35 GMT
Viewed: 
1272 times
  
Well, I've gone and run out of memory with my RCX. It manifested itself in
a task that refused to run, presumably because the OS couldn't allocate
enough memory for its stack. Took a while to track down and was annoying,
but it was my own fault for not checking error codes.

Anyway, my question is, how can I reduce memory usage? I think cutting
down LegOS itself is pretty much a lost cause. Of the list in the HOWTO,
sound is about the only optional item. I suppose I could try turning that
off and seeing how much that saves. Is the size of .srec and .lx files a
good indicator of how much space the respective programs will take up in
the RCX? Is it possible to have gcc optimize for space? Is gcc smart
enough to throw away functions I don't use once the compilation process is
complete? Lastly, how can I figure out approximately how much stack space
a task will need? I have several tasks running, and most of them don't use
much in the way of local variables or deep calling chains, so the default
stack space is probably quite a waste for those.

--
"Say not, 'I have found the truth,' but rather, 'I have found a truth.'
"Say not, 'I have found the path of the soul.' Say rather, 'I have met the
soul walking upon my path.'" -- Khalil Gibran
Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>



Message has 1 Reply:
  Re: Memory Usage
 
(...) itself in (...) allocate (...) annoying, (...) You can test memory left using the routine from Eddie: (URL) Anyway, my question is, how can I reduce memory usage? I think cutting (...) HOWTO, (...) that (...) a (...) in (...) process is (...) (...) (24 years ago, 15-Oct-00, to lugnet.robotics.rcx.legos)

6 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR