View Single Post
  #1   Spotlight this post!  
Unread 27-01-2015, 18:04
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
RoboRIO won't let us use more than 50mb of RAM?

Our team plans to use vision to help us locate and align with the yellow totes. We plan to do run our image processing on the roboRIO, as we should only need to do analysis of 6 frames during autonomous mode. For time-saving purposes, we like to keep lots of information in the roboRIO's RAM for debugging/frame by frame playback. I was running a ported version of the vision stuff a student had made with the cRIO, but I am constantly getting out of memory errors.

We're using Java.
Here's what I've put together so far:
The roboRIO has 256 mb of RAM, twice as much as the cRIO.

When the user code has been killed, background processes use 151 mb of the 256 mb. I don't know why this is so much (I guess linux isn't as small as it once was), but it's not unreasonable, considering there's networking, communications, web server, ftp, ssh....

This leaves 105 mb for the user code. Running an empty iterative robot project brings this down to 93 mb free. Why the controller needs 12 mb of memory to call the disabledPeriodic method is beyond me, but still, not too unreasonable.

93 mb is still a decent amount RAM. However, when I get to 60 mb of free memory, the java program is terminated.

This seems a little silly, as the code once ran on a cRIO and didn't get an out of memory error because the cRIO let me get down to 4 mb of free RAM. I'm likely doing something stupid, but I don't know what I'm doing. Any suggestions on how to get to the extra 60 mb of RAM?
Reply With Quote