Posts: 43
Threads: 13
Joined: Nov 2002
Thanks for everyone's help. I split my program into 11 modules including the main module and the program compiles great....
...BUT....
When I go to run the program, an error message comes up saying:
Quote:Out of Memory in module xxxx, at address xxxx:xxxx
So, to check the size, I right-click the .exe file and it says that it is 209KB; however, just before I compiled the program, it said that it was 28KB. What happened?
Posts: 704
Threads: 0
Joined: Dec 2002
in the first line of that module, if not the rest of them too. (However, I'd be real surprised if you actually need 11 modules. You're quite industrious.
)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 43
Threads: 13
Joined: Nov 2002
Lol, maybe so. I'll try doing what you suggested to see if it works. I split the program into 11 modules just to be sure that it will work.
Posts: 43
Threads: 13
Joined: Nov 2002
Well, I tried it, and sadly, it did not solve the problem. I get the same error message as before, and the .exe file is 210KB.
Any more ideas anyone?
Posts: 6,419
Threads: 74
Joined: Mar 2002
* Use less globals (when they are arrays that are just used somewhere and you can get rid of when not used).
* Use less intermodule globals.
* Load stuff into arrays just when you are going to use them , then erase the arrays.
Read this:
http://faq.qbasicnews.com/?blast=PushingTheLimitsOfQb
Out of memory errors in runtime come from too much dynamic data being allocated (too much arrays, or too big arrays).
Also, 210 Kb is HUGE
Posts: 43
Threads: 13
Joined: Nov 2002
Posts: 704
Threads: 0
Joined: Dec 2002
What's bigger than huge? I have programs that take up over 400 KB for just data.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 6,419
Threads: 74
Joined: Mar 2002
I mean huge for QB standards. Huge compared on what I've seen. Huge compared on what I've got. I've only seen one or two QB EXEs that pass the 200 Kb barrier.
Posts: 4,307
Threads: 63
Joined: May 2003
My Exe is 209kb and it runs without a hitch. So may be he can post his code so that we can see what exactly are the definations. 8)
Posts: 43
Threads: 13
Joined: Nov 2002
The problem has been solved. It was an array that I was reserving too much space for; I should have known that was the problem. :o