Hi All,
Could anyone please tell about the maximum array size allowed By RobotC?
I wanted to define 100*100 2D arrays by pre allocating the memory:
Code:
float ogMap[100][100]; // to store the map
but I got this error:
**Severe*:Out of memory for variable allocation.
Thanks in advance
asma
Tue Apr 01, 2008 9:31 am
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
I just asked asked that before, also for a map
variable memory is limited to 15 k
for me, this limit was too low... If you would like more, too: please ask the developers
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
Tue Apr 01, 2008 11:11 am
asma
Rookie
Joined: Sat Mar 01, 2008 3:44 am Posts: 5
So, what could be a best solution to values that should be indexed using x and y?
• Will pointer help out?
• Or is writing values to a file directly a good solution considering that we have lines number(y) and columns number (x)?
• Could datalog be a good solution?
Regards,
Asma
Tue Apr 01, 2008 11:42 am
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
pointer won't help, cause there is no heap available.
writing a file to NXT file system is very slow and stops program execution during file I/O - and how do you want to read the values it if you don't have that memory?
with data logging I don't know how to solve this either.
look at these threads, where I asked about this memory problem before:
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
Tue Apr 01, 2008 5:51 pm
asma
Rookie
Joined: Sat Mar 01, 2008 3:44 am Posts: 5
Well, I was thinking to export the datalog file to Excel or to write a small application in C or Java such that I could display the data as a map.
Any good suggestion to overcome memory limitation?
Users browsing this forum: No registered users and 4 guests
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 post attachments in this forum