Out of Memory in large vb6 app

Reply

Join Date: Aug 2008
Posts: 5
Reputation: pclarkeo is an unknown quantity at this point 
Solved Threads: 0
pclarkeo pclarkeo is offline Offline
Newbie Poster

Out of Memory in large vb6 app

 
0
  #1
Aug 21st, 2008
Hi there,

I have been working in a company for the last 4 years that develop a large vb6 app. For 3 of those years, we have been expierencing "Out of Memory" issues.

This manifests itself as an Out of Memory error when compiling.

As I said it is a fairly large vb6 app. We're talking over 500 Forms, Modules and classes. The .exe it creates is > 11MB. If it goes any larger than this (by adding new functionality forms, clasess or otherwise), it throws the out of memory

The way we've been dealing with this to date, is by moving parts of the system into a seperate module which would be run by a DDE call to this exe. Obviously this is not ideal..a bit like rearranging the deckchairs on the titanic. We have streamlined our code and have removed all dead variables and functions.

Has anyone expierenced this themselves? Is the only solution not to add more functionality i.e. have we reached the limit size of a vb app?
Any input would be most welcome.

Many Thanks
Paul
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,407
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Out of Memory in large vb6 app

 
0
  #2
Aug 21st, 2008
You can gain as much memory as you want if you create DLLs.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Out of Memory in large vb6 app

 
0
  #3
Aug 21st, 2008
Hi,

Applications what I Work, has got some 400 (Forms+modules+classes), We have never faced such Out of Memory issue..
May be, because, the system I work is with the latest Configuration, Good Memory and high RAM.
The best part is we use external Crystalreports.. So no need to embed reports into our proj..
Say, if you are using Datareports ,
then you can move that functionality to CR or excel reports..

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 5
Reputation: pclarkeo is an unknown quantity at this point 
Solved Threads: 0
pclarkeo pclarkeo is offline Offline
Newbie Poster

Re: Out of Memory in large vb6 app

 
0
  #4
Aug 21st, 2008
Originally Posted by Ancient Dragon View Post
You can gain as much memory as you want if you create DLLs.
Unfortunatly the app is at a stage where using DLLs now would require big rewrite of code and is unfeasible. If it was designed correctly from the outset this would of been the approach taken.

We are moving to vb.net in the next 2 years but this itself is a huge undertaking and will be an extremely slow process. Am I right in saying that with .net it is alot easier to include libraries?

There is constant development work which has now come to a stand still pending a fix of this, we actually can't fit any more into the app.

We're already using external CR and I dont think that latest Configuration, Good Memory and high RAM are the issue, its more the size of the vb project itself. The issue is the same on any machine. But thanks for your input QVeen. Just out of curiosity how big is the exe that is created from this project QVeen?

Paul
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Out of Memory in large vb6 app

 
0
  #5
Aug 22nd, 2008
Hi,

RAM Definately comes into picture,
You need a very High RAM..
You will get OUT OF MEMORY issue for lower RAm's..
Also, make sure, when you close your Project or while making EXE, Close all the Open Forms..

My Exe file is 11.5 MB

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 5
Reputation: pclarkeo is an unknown quantity at this point 
Solved Threads: 0
pclarkeo pclarkeo is offline Offline
Newbie Poster

Re: Out of Memory in large vb6 app

 
0
  #6
Aug 22nd, 2008
Originally Posted by QVeen72 View Post
RAM Definately comes into picture,
Thanks for the reply veena

Does this mean that theres no set limit to a vb project but only how much the particular machine can handle?

Also what kinda RAM we talkin here?

Paul
Last edited by pclarkeo; Aug 22nd, 2008 at 7:14 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,407
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Out of Memory in large vb6 app

 
0
  #7
Aug 22nd, 2008
RAM isn't the problem -- size of the executable program is. There is a maximum size of any executable that runs on MS-Windows -- I recall reading that somewhere awhile back but don't recall exactly where.

>>using DLLs now would require big rewrite of code and is unfeasible.
You don't have to convert the entire program to DLLs -- just enough to get you out of your current development standstill. unfeasible??? which is better -- rewriting parts of the code to use DLLs, or stopping all current and future program development. You need a fix to the problem and I think DLLs is the only solution you have.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 5
Reputation: pclarkeo is an unknown quantity at this point 
Solved Threads: 0
pclarkeo pclarkeo is offline Offline
Newbie Poster

Re: Out of Memory in large vb6 app

 
0
  #8
Aug 22nd, 2008
Originally Posted by Ancient Dragon View Post
I think DLLs is the only solution you have.
Ok thanks for the input Dragon. I'll look into it.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Out of Memory in large vb6 app

 
0
  #9
Aug 23rd, 2008
Hi,

mine is 4mb of RAM..
Also while Compiling, Set your options to
"Compile to P-Code"
This compile is faster and will reduce your Exe Size by at least 20%..
I Myself have tried it..
and none of our Clients have problem with Exe (Compiled with P-Code)
and Most of the ERP's what I handle have Total Modules ranging from 300 to 450. And At times I would have opened at least 2-3 of these projects and work without any problem..
I always find shortage of Menus on the Main MDI(as VB supports Max 255 Controls on any module).. But have found solution by using MenuArrays..

If Talking of Maximum EXE Size, Windows can handle.. I have many applications in my System > 15mb... (e.g Oracle9i is 29 mb)


Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 41
Reputation: dspnhn is an unknown quantity at this point 
Solved Threads: 4
dspnhn dspnhn is offline Offline
Light Poster

Re: Out of Memory in large vb6 app

 
0
  #10
Aug 23rd, 2008
I agree with veena......compile to p-code (psuedo code)....it is faster and more efficient in porting data from comp to comp
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC