To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 878
877  |  879
Subject: 
Re: File Error - what does it exactly mean?
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 17 Aug 2007 15:35:55 GMT
Viewed: 
23228 times
  
In lugnet.robotics.nxt, Pavel Petrovic wrote:
But I am getting it when trying to allocate an array that is larger
than the amount of heap available.

You've got 32k to work with for all variables of all types, including
user-defined types and arrays.  Every time you manipulate an array you use up
more memory due to copying taking place in the VM.

If you shared with me some information about your program I might be able to
help you avoid excessive memory allocations. Email me and I'll try to help.

John Hansen



Message has 1 Reply:
  Re: File Error - what does it exactly mean?
 
(...) Well, I try to allocate all memory available for one big array and then deal with it using my own memory manager with C-like calls of malloc and free. It works fine, but I'd need to know how big this one array I can make while the program (...) (17 years ago, 17-Aug-07, to lugnet.robotics.nxt)

Message is in Reply To:
  Re: File Error - what does it exactly mean?
 
(...) But I am getting it when trying to allocate an array that is larger than the amount of heap available. And it seems there is no way of checking how much space remains free, so I have no way of preventing this File Error! from happening if I (...) (17 years ago, 17-Aug-07, to lugnet.robotics.nxt)

6 Messages in This Thread:

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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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