Author |
Topic: Program is too long for allocated memory (Read 1035 times) |
|
David Williams
Developer
member is offline

meh

Gender: 
Posts: 452
|
 |
Program is too long for allocated memory
« Thread started on: May 25th, 2009, 06:24am » |
|
Possibly two bugs here.
Firstly, when the IDE error message "Program is too long for allocated memory" is displayed, clicking the OK button has no effect other than make the computer emit a beep - the error box won't close. The only way I can find to close the editor is via the Task Manager. Secondly, when I announced the other day that GFXLIB has exceeded 1 MB in size, I was mistaken, but it is now 1,046,571 bytes long. When I try to cut and paste a section of code (within the same program), I get the above error message. With 2 GB of RAM, and no other major applications running, should I be getting that error message?
David.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Program is too long for allocated memory
« Reply #1 on: May 25th, 2009, 10:19am » |
|
Quote:when the IDE error message "Program is too long for allocated memory" is displayed, clicking the OK button has no effect other than make the computer emit a beep - the error box won't close. |
|
It may appear that's what's happening - but it isn't really. What's actually happening is that as soon as you dismiss the error box another error is being generated - causing the box to reappear immediately. This can happen when the cause of the 'out of memory' condition is a multi-line paste operation; for each line in the clipboard you'll get the error again. If you had clicked on OK enough times it would have cleared.
Unfortunately the way the code is structured there's no easy way of aborting a 'paste' operation part way through. Therefore this behaviour is 'by design', sorry.
Quote:When I try to cut and paste a section of code (within the same program), I get the above error message. With 2 GB of RAM, and no other major applications running, should I be getting that error message? |
|
Yes, if you haven't increased the amount of memory available. Did you read the section of the manual on that error message: "There is insufficient memory for your BASIC program. Increase the value of HIMEM or change the initial program memory setting and re-start BBC BASIC":
http://www.bbcbasic.co.uk/bbcwin/manual/bbcwinc.html#progtoobig
If you're working on programs that huge (not really to be recommended) you'll need to go into the 'Options... Customize...' menu, increase the 'Initial user memory' setting and restart BB4W.
Richard.
|
|
Logged
|
|
|
|
David Williams
Developer
member is offline

meh

Gender: 
Posts: 452
|
 |
Re: Program is too long for allocated memory
« Reply #2 on: May 25th, 2009, 9:43pm » |
|
on May 25th, 2009, 10:19am, Richard Russell wrote:Yes, if you haven't increased the amount of memory available. Did you read the section of the manual on that error message: |
|
Yes, I did try to find the info associated with that error message, but somehow I managed to not find it. I didn't look very hard, obviously... it was early in the morning, and I'd been up all night.
(Excuses.)
Thanks, Richard, and sorry for the false alarm(s).
Regards,
David.
|
|
Logged
|
|
|
|
|