Help: Out of memory in a VB-DOS stats program
Author |
Message |
v.. #1 / 14
|
 Help: Out of memory in a VB-DOS stats program
I wrote a statistical program in VB-DOS. It does Receiver Operating Characteristic Analysis. Unfortunately, by the time I finished all the forms needed, the memory available for sample size dropped sharply from the previous text-only program, even in the compiled version. The program is pretty array-intensive. I have - kept variables as compact as possible (integers where possible, fixed-length strings, etc) - unloaded all forms not used - restricted scope of all the variables I could Any ideas on how I can get more memory? Is VB-DOS limited by the DOS 640 K barrier, even when operating under Win95? Any way to get around this, if so? Would rewriting in VB for Windows help? Would closing arrays when finished with the variables help? Thanks to anyone with any knowledge of above. Steve
|
Sun, 21 Feb 1999 03:00:00 GMT |
|
 |
Daniel P Huds #2 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>I wrote a statistical program in VB-DOS. It does Receiver Operating
Ever heard of the return key? I hate having to edit quotes because someone's editor supports line wrapping when the internet doesn't! Quote: >Unfortunately, by the time I finished all the forms needed, >the memory available for sample size dropped sharply from >the previous text-only program, even in the compiled version. >The program is pretty array-intensive.
Use $dynamic arrays when possible by using REDIM to allocate them and ERASE them when not being used, you can always REDIM them back up, they just won't have any usable data stored. Quote: >Any ideas on how I can get more memory? Is VB-DOS limited by the >DOS 640 K barrier, even when operating under Win95? Any way to >get around this, if so?
Yes, any program running under MS-DOS, reguardless of the parent OS, is limited to 640KB. Look in your manual for overlay's and read up these will help if your product supports them.
|
Sun, 21 Feb 1999 03:00:00 GMT |
|
 |
Sensar #3 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >I wrote a statistical program in VB-DOS. It does Receiver Operating > Ever heard of the return key? I hate having to edit quotes because > someone's editor supports line wrapping when the internet doesn't! > >Unfortunately, by the time I finished all the forms needed, > >the memory available for sample size dropped sharply from > >the previous text-only program, even in the compiled version. > >The program is pretty array-intensive. > Use $dynamic arrays when possible by using REDIM to allocate them and > ERASE them when not being used, you can always REDIM them back up, > they just won't have any usable data stored. > >Any ideas on how I can get more memory? Is VB-DOS limited by the > >DOS 640 K barrier, even when operating under Win95? Any way to > >get around this, if so? > Yes, any program running under MS-DOS, reguardless of the parent OS, > is limited to 640KB. Look in your manual for overlay's and read up > these will help if your product supports them.
Hmmm... Does Win95 emulate protected mode too? -- ______________________________ Steven Sensarn
______________________________
|
Mon, 22 Feb 1999 03:00:00 GMT |
|
 |
Daniel P Huds #4 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>> Yes, any program running under MS-DOS, reguardless of the parent OS, >> is limited to 640KB. Look in your manual for overlay's and read up >> these will help if your product supports them. >Hmmm... Does Win95 emulate protected mode too?
Hmm, do programs compiled under VBDOS run in protected mode? Perhaps I should have said any program compiled with VBDOS is limited to 640KB, of corse you can use EMS and XMS memory you just have to transfer the data to and fro so you can use it, but you can still only address up to 1 MB, and the code will only be loaded into the lower 640KB.
|
Tue, 23 Feb 1999 03:00:00 GMT |
|
 |
Sensar #5 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >> Yes, any program running under MS-DOS, reguardless of the parent OS, > >> is limited to 640KB. Look in your manual for overlay's and read up > >> these will help if your product supports them. > >Hmmm... Does Win95 emulate protected mode too? > Hmm, do programs compiled under VBDOS run in protected mode?
No, no, no. No sarcasm intended. Really--this has nothing to do with the subject at hand but does Win95 emulate protected mode? I'm thinking about getting it and some of my great games wouldn't work (I spent quite a bit of money on those). Quote: > Perhaps I should have said any program compiled with VBDOS is > limited to 640KB, of corse you can use EMS and XMS memory > you just have to transfer the data to and fro so you can > use it, but you can still only address up to 1 MB, and the > code will only be loaded into the lower 640KB.
-- ______________________________ Steven Sensarn
______________________________
|
Fri, 26 Feb 1999 03:00:00 GMT |
|
 |
Daniel P Huds #6 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>> >> Yes, any program running under MS-DOS, reguardless of the parent OS, >> >> is limited to 640KB. Look in your manual for overlay's and read up >> >> these will help if your product supports them. >> >Hmmm... Does Win95 emulate protected mode too? >> Hmm, do programs compiled under VBDOS run in protected mode? > No, no, no. No sarcasm intended. Really--this has nothing to do with >the subject at hand but does Win95 emulate protected mode? I'm thinking >about getting it and some of my great games wouldn't work (I spent quite >a bit of money on those).
I'm sorry, I don't follow. Protected Mode is a mode the CPU operates in, and Windows must be able to set the CPU into protected mode to run. Perhaps you mean EMS emmulation? If so, I have no idea, but I'm sure QUEMM has come out with something for this purpose by now, and since WhenDoze 95' claims to run most Dos apps, I would assume it must support some sort of EMS emmulation. Of corse, there is always a boot-partition manager too which would let you choose to boot Win 95' or your current version if MS-DOS.
|
Sun, 28 Feb 1999 03:00:00 GMT |
|
 |
Sensar #7 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >> >> Yes, any program running under MS-DOS, reguardless of the parent OS, > >> >> is limited to 640KB. Look in your manual for overlay's and read up > >> >> these will help if your product supports them. > >> >Hmmm... Does Win95 emulate protected mode too? > >> Hmm, do programs compiled under VBDOS run in protected mode? > > No, no, no. No sarcasm intended. Really--this has nothing to do with > >the subject at hand but does Win95 emulate protected mode? I'm thinking > >about getting it and some of my great games wouldn't work (I spent quite > >a bit of money on those). > I'm sorry, I don't follow. Protected Mode is a mode the CPU operates in, > and Windows must be able to set the CPU into protected mode to run.
Sure, but if Windows is already in protected mode (i.e. 32 bit enhanced mode), how would other pmode programs work (ones that use different DOS extenders, etc.)? I have not yet tried to run a pmode DOS program under Windows (intentionally), fearfull of an unfortunate outcome. Quote: > Perhaps you mean EMS emmulation? If so, I have no idea, but I'm > sure QUEMM has come out with something for this purpose by now, > and since WhenDoze 95' claims to run most Dos apps, I would assume > it must support some sort of EMS emmulation. Of corse, there is always > a boot-partition manager too which would let you choose to boot Win 95' > or your current version if MS-DOS.
Now there's a relief. I didn't know that; thanks. -- ______________________________ Steven Sensarn
______________________________
|
Mon, 01 Mar 1999 03:00:00 GMT |
|
 |
Daniel P Huds #8 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>> I'm sorry, I don't follow. Protected Mode is a mode the CPU operates in, >> and Windows must be able to set the CPU into protected mode to run. > Sure, but if Windows is already in protected mode (i.e. 32 bit enhanced >mode), how would other pmode programs work (ones that use different DOS >extenders, etc.)? I have not yet tried to run a pmode DOS program under >Windows (intentionally), fearfull of an unfortunate outcome.
If I remember correctly, Windows swaps the CPU between v86 and Protected mode as needed for the system to attempt [and poorly at that] to remain stable. Running a DPMI server under windows is fine, IF you happen to just have so much memory you don't need to worry since whendoze will not unload enough of itself for anything under 8MB Ram. Running command.com placed the CPU back in v86 mode until the Windows OS needs the CPU for time slicing or whatever at which time it sets it back to protected, performs its operations and returns it to the first state. Quote: >> Perhaps you mean EMS emmulation? If so, I have no idea, but I'm >> sure QUEMM has come out with something for this purpose by now, >> and since WhenDoze 95' claims to run most Dos apps, I would assume >> it must support some sort of EMS emmulation. Of corse, there is always >> a boot-partition manager too which would let you choose to boot Win 95' >> or your current version of MS-DOS. >Now there's a relief. I didn't know that thanks.
Yes, these have been available for years, In fact, I believe one is distributed free with linux. But let me clarify, I don't know if 95 comes with a partition manager, however they are available.
|
Tue, 02 Mar 1999 03:00:00 GMT |
|
 |
James A. Gan #9 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >> >> Yes, any program running under MS-DOS, reguardless of the parent OS, > >> >> is limited to 640KB. Look in your manual for overlay's and read up > >> >> these will help if your product supports them. > >> >Hmmm... Does Win95 emulate protected mode too? > >> Hmm, do programs compiled under VBDOS run in protected mode?
VB/DOS will NOT generate a DOS Protected Mode EXE. You are still limited at 640k. However, VB/DOS will generate overlays. Divide your ap into separate modules. After compiling you will have an OBJ file for each module. Link with parentheses around the names of the modules you want to be an overlay. The linker will put everything into one EXE. The overlay manager built into the EXE will handle everything for you. It will use XMS, EMS or disk space (whatever is available) for swapping overlays. The Overlays section in the Professional Features manual gives some examples of this. The Corporation I work for, sells and supports a complete business management and accounting package written almost entirely in VB/DOS. It runs fine under DOS 6.x, Win3.1, WFW3.11, and Windows95. We just don't do anything weird like opening a printer port directly (i.e. OPEN "LPT1:") that Windows95 Print Manager wants to spool to. Quote: > > No, no, no. No sarcasm intended. Really--this has nothing to do with > >the subject at hand but does Win95 emulate protected mode? I'm thinking > >about getting it and some of my great games wouldn't work (I spent quite > >a bit of money on those). > I'm sorry, I don't follow. Protected Mode is a mode the CPU operates in, > and Windows must be able to set the CPU into protected mode to run. > Perhaps you mean EMS emmulation? If so, I have no idea, but I'm > sure QUEMM has come out with something for this purpose by now, > and since WhenDoze 95' claims to run most Dos apps, I would assume > it must support some sort of EMS emmulation. Of corse, there is always > a boot-partition manager too which would let you choose to boot Win 95' > or your current version if MS-DOS.
|
Thu, 04 Mar 1999 03:00:00 GMT |
|
 |
Daniel P Huds #10 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>> >> >Hmmm... Does Win95 emulate protected mode too? >> >> Hmm, do programs compiled under VBDOS run in protected mode? >VB/DOS will NOT generate a DOS Protected Mode EXE. You are >still limited at 640k. However, VB/DOS will generate overlays. Divide
My apologies James. I thought Steve was trying to be smart when he asked his question about win95 emulating protected mode, so I replied with my smartass question. I have VB-DOS and am well aware it doesn't compile into protected Mode EXE's and so is Steve. The original question had been answered already which was something about getting around the "OUT OF DATA MEMORY" message.
|
Thu, 04 Mar 1999 03:00:00 GMT |
|
 |
Sensar #11 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >> I'm sorry, I don't follow. Protected Mode is a mode the CPU operates in, > >> and Windows must be able to set the CPU into protected mode to run. > > Sure, but if Windows is already in protected mode (i.e. 32 bit enhanced > >mode), how would other pmode programs work (ones that use different DOS > >extenders, etc.)? I have not yet tried to run a pmode DOS program under > >Windows (intentionally), fearfull of an unfortunate outcome. > If I remember correctly, Windows swaps the CPU between v86 and > Protected mode as needed for the system to attempt [and poorly at that] > to remain stable. Running a DPMI server under windows is fine, IF you > happen to just have so much memory you don't need to worry since > whendoze will not unload enough of itself for anything > under 8MB Ram. Running command.com placed the CPU back in v86 mode > until the Windows OS needs the CPU for time slicing or whatever > at which time it sets it back to protected, performs its operations > and returns it to the first state.
Now that I think about it, I HAVE run DPMI programs under Windows (TC++ IDE)--just not any games... Quote: > >> Perhaps you mean EMS emmulation? If so, I have no idea, but I'm > >> sure QUEMM has come out with something for this purpose by now, > >> and since WhenDoze 95' claims to run most Dos apps, I would assume > >> it must support some sort of EMS emmulation. Of corse, there is always > >> a boot-partition manager too which would let you choose to boot Win 95' > >> or your current version of MS-DOS. > >Now there's a relief. I didn't know that thanks. > Yes, these have been available for years, In fact, I believe > one is distributed free with linux. But let me clarify, I don't > know if 95 comes with a partition manager, however they are available.
My friend got a new computer and Win95 came with it. It had a "BOOT TO DOS" option and I always thought it was merely an emulation (I thought only Win95 was on his computer, but I guess there's a DOS there too). -- ______________________________ Steven Sensarn
______________________________
|
Sat, 06 Mar 1999 03:00:00 GMT |
|
 |
Daniel P Huds #12 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>My friend got a new computer and Win95 came with it. It had a "BOOT TO >DOS" option and I always thought it was merely an emulation (I thought >only Win95 was on his computer, but I guess there's a DOS there too).
I imagine that is the DOS 7 emmulator, does it appear to offer a change to run WIN95 without re-booting? if so, its not DOS, it is whendoze emmulator or MS actually made something beyond normal standards for once.
|
Sun, 07 Mar 1999 03:00:00 GMT |
|
 |
Glen Blankensh #13 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
> >My friend got a new computer and Win95 came with it. It had a "BOOT TO > >DOS" option and I always thought it was merely an emulation (I thought > >only Win95 was on his computer, but I guess there's a DOS there too). > I imagine that is the DOS 7 emmulator, does it appear to offer > a change to run WIN95 without re-booting? if so, its not > DOS, it is whendoze emmulator or MS actually made something > beyond normal standards for once.
Win95 has two different DOS modes - the Win95 "Dos box", which is a V86-mode emulator that actually runs under the supervision of Win95, and a genuine real-mode DOS ("MS-DOS mode") that you have to reboot to get to. (The real-mode DOS box can, of course, be kicked into V86 or protected mode by things like EMM386 and DOS extenders, but it runs in real mode by default.) --- Glen Blankenship Hudsucker Industries
|
Tue, 09 Mar 1999 03:00:00 GMT |
|
 |
Ian Stapl #14 / 14
|
 Help: Out of memory in a VB-DOS stats program
Quote:
>Win95 has two different DOS modes - the Win95 "Dos box", which is a >V86-mode emulator that actually runs under the supervision of Win95, and a >genuine real-mode DOS ("MS-DOS mode") that you have to reboot to get to.
I'm told by one who may know these things that "MSDOS 7" in Win95 is actually MSDOS 6.22 which has been slightly hacked so that it will look for Windows if you type EXIT and, if it finds it, it will boot back into Win95 mode automatically from real-mode. Cheers, Ian S. --
c/- P.O. Box 1054 MAREEBA Phone : +61 (0)70 928 555 Home 924 847 Queensland Australia 4880 Fax : +61 (0)70 923 593 " " "
|
Fri, 12 Mar 1999 03:00:00 GMT |
|
|
|