Can I define how much free memory is reported to an app?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Can I define how much free memory is reported to an app?

Post by pcull »

Hi

Sorry if this is a simple question, I haven't been able to find this out by myself!

I'm trying to run an old application that I wrote under Visual BASIC 4.0 many years ago, however I am encountering the same problem under Wine that I find under modern XP: while trying to open the database I receive a 2004: Out of Memory error.

It appears that this problem is actually due to an over-abundance of memory, and that the old DAO3032.DLL probably returnes RAM values around the 1 GB range or more, as negative numbers.

Porting to VB 6 is out of the question at the moment, so I am wondering if there is some switch or registry key which would allow me to tell Wine to report LESS available system RAM than is actually available.

Any suggestions welcome

Paul Cull
Dan Kegel

Can I define how much free memory is reported to an app?

Post by Dan Kegel »

On Tue, Mar 11, 2008 at 3:26 AM, pcull <[email protected]> wrote:
I'm trying to run an old application that I wrote under
Visual BASIC 4.0 many years ago, however I am encountering
the same problem under Wine that I find under modern XP:
while trying to open the database I receive a 2004: Out of Memory error.

It appears that this problem is actually due to an over-abundance
of memory, and that the old DAO3032.DLL probably returnes
RAM values around the 1 GB range or more, as negative numbers.
Can you write a tiny demo program that exposes the
problem, and post source and binaries?
That would make it easier for us to help.
- Dan
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Can I define how much free memory is reported to an app?

Post by vitamin »

pcull wrote:Porting to VB 6 is out of the question at the moment, so I am wondering if there is some switch or registry key which would allow me to tell Wine to report LESS available system RAM than is actually available.
No there isn't one. And if this program fails on WinXP the same way it would be hard to convince Alexandre to "fix" this.

However I think having a list of app compatibility settings in winecfg might not be such a bad idea. Along the lines of winversion.
Markus Hitter

Can I define how much free memory is reported to an app?

Post by Markus Hitter »

Am 11.03.2008 um 15:07 schrieb vitamin:
pcull wrote:
Porting to VB 6 is out of the question at the moment, so I am
wondering if there is some switch or registry key which would
allow me to tell Wine to report LESS available system RAM than is
actually available.
No there isn't one. And if this program fails on WinXP the same way
it would be hard to convince Alexandre to "fix" this.

However I think having a list of app compatibility settings in
winecfg might not be such a bad idea. Along the lines of winversion.
As it works on Win95, a RAM < 2 GiB assumption could/should be built
into the Win95 compatibility setting. Additional configuration
settings always include the chance to mis-configure something.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Can I define how much free memory is reported to an app?

Post by vitamin »

Markus Hitter wrote:As it works on Win95, a RAM < 2 GiB assumption could/should be built
into the Win95 compatibility setting.
I doubt this is the case here. I think Wine does return correct values in win9x mode. However it still might be too big here.
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Post by pcull »

Yes, I suspect that, although we seem to have true compatibility with Win 9x, the fact is that some programs (such as the MSJet 3 engine used for Visual BASIC 4) are not compatible with the large amounts of RAM available to us these days. Of course, the same thing can happen with modern disk capacities, which return negative numbers of free space.

If it were possible to implement configurable limits for reported RAM (and/or disk space) when running under Win 9x compatibility, I believe this would allow more of these old programs under Wine.

Paul
Dan Kegel

Can I define how much free memory is reported to an app?

Post by Dan Kegel »

On Tue, Mar 11, 2008 at 3:24 PM, pcull <[email protected]> wrote:
the same thing can happen with modern disk capacities, which return negative numbers of free space.
Yeah, I fixed a bug like that in disk space reported
to MS-DOS / win16 apps a couple years ago.

Once we have a bona fide repeatable problem in
the hands of a wine developer, we can look
at fixing the cap on memory reported to old apps, too.
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Post by pcull »

For what it's worth here's an MS Knowledge Base article about the problems of having too much memory:

http://support.microsoft.com/default.as ... US;q253912

Here Microsoft define a large amount of memory as being over 512 megabytes, and one of their solutions is to physically remove memory!

I suspect that if Wine included the ability to cap reported system memory under Win9x that it could become a useful alternative for people needing to run old legacy applications under modern hardware!

Paul
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Post by pcull »

I'm sorry that I'm still rambling on about this... I promise I'll go away and stop bothering people soon....

A possible solution to this would be implementing the MaxPhysPage key from Windows 98's system.ini file. This would be a system-wide as opposed to application-specific limit, but would certainly enable these legacy apps to run under Wine.

I found this key described here: http://support.microsoft.com/kb/181966/EN-US/

Paul
Dan Kegel

Can I define how much free memory is reported to an app?

Post by Dan Kegel »

On Tue, Mar 11, 2008 at 4:17 PM, pcull <[email protected]> wrote:
I'm sorry that I'm still rambling on about this... I promise I'll go away and stop bothering people soon....
Don't go away. Instead, send the demo app I asked for earlier...
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Post by pcull »

Hi

At the moment I'm on one side of the planet (New Zealand) and my VB 4.0 compiler is on the other side (Brazil) so I can't prepare a sample project. I suspect that anything in VB that tries to open an MSJet database file would cause this problem.

However, I can send you both the source and a zip of the application itself, which is a Bible concordance program, with both English and Portuguese versions. A zip file of the object code with all necessary databases can be found here: (14 megabytes) http://www.avivamentoja.org/download/verbo17.zip

I'll gladly send source code or anything else that would help, just let me know where to send it to.

Regards

Paul
James McKenzie

Can I define how much free memory is reported to an app?

Post by James McKenzie »

pcull wrote:
Hi

At the moment I'm on one side of the planet (New Zealand) and VB 4.0 compiler is on the other side (Brazil) so I can't prepare a sample project. I suspect that anything in VB that tries to open an MSJet database file would cause this problem.

However, I can send you both the source and a zip of the application itself, which is a Bible concordance program, with both English and Portuguese versions. A zip file of the object code with all necessary databases can be found here: (14 megabytes) http://www.avivamentoja.org/download/verbo17.zip

I'm pulling it down to a Mac with 1GB of memory to see if it runs here.

James
pcull
Level 1
Level 1
Posts: 6
Joined: Tue Mar 11, 2008 5:12 am

Post by pcull »

Cool. If it doesn't run, you'll get a pop-up with the error message 2004: Out of memory while still on the splash-screen. If you can get to the main menu, it's running ok!

Paul
Jeff Zaroyko

Can I define how much free memory is reported to an app?

Post by Jeff Zaroyko »

Dan Kegel <dank <at> kegel.com> writes:
On Tue, Mar 11, 2008 at 4:17 PM, pcull <wineforum-user <at> winehq.org> wrote:
I'm sorry that I'm still rambling on about this... I promise I'll go away
and stop bothering people soon....
Don't go away. Instead, send the demo app I asked for earlier...

This might be a dup of bug 10844, which affects two programs so far as I'm
aware, Need for Speed II demo and Genotyper.

http://bugs.winehq.org/show_bug.cgi?id=10844
James McKenzie

Can I define how much free memory is reported to an app?

Post by James McKenzie »

pcull wrote:
Hi

At the moment I'm on one side of the planet (New Zealand) and VB 4.0 compiler is on the other side (Brazil) so I can't prepare a sample project. I suspect that anything in VB that tries to open an MSJet database file would cause this problem.

However, I can send you both the source and a zip of the application itself, which is a Bible concordance program, with both English and Portuguese versions. A zip file of the object code with all necessary databases can be found here: (14 megabytes) http://www.avivamentoja.org/download/verbo17.zip

I'll gladly send source code or anything else that would help, just let me know where to send it to.

Just for the record, Verbo does not work here either. Too much memory!

I will transfer it to a system with less than 512MB of installed memory
to see if it installs and runs.

James McKenzie
Jeff Zaroyko

Can I define how much free memory is reported to an app?

Post by Jeff Zaroyko »

Jeff Zaroyko <jeffzaroyko <at> gmail.com> writes:
This might be a dup of bug 10844, which affects two programs so far as I'm
aware, Need for Speed II demo and Genotyper.

http://bugs.winehq.org/show_bug.cgi?id=10844

ok, a test revealed that it is not the exact same issue as the
work around of modifying the pe header subsystem field to 3
didn't fix this program.

The issue could be similar though, where older windows versions
under wine shouldn't report too much memory.
Dan Kegel

Can I define how much free memory is reported to an app?

Post by Dan Kegel »

On Tue, Mar 11, 2008 at 9:05 PM, James McKenzie
<[email protected]> wrote:
Just for the record, Verbo does not work here either. Too much memory!

I will transfer it to a system with less than 512MB of installed memory
to see if it installs and runs.
Or just reboot your current system and put mem=512M on the
kernel commandline. See 'man bootparam'.
felix
Level 2
Level 2
Posts: 45
Joined: Thu Feb 28, 2008 10:04 am

Can I define how much free memory is reported to an app?

Post by felix »

On Tue, Mar 11, 2008 at 09:05:57PM -0700, James McKenzie wrote:
Just for the record, Verbo does not work here either. Too much memory!

I will transfer it to a system with less than 512MB of installed memory
to see if it installs and runs.

James McKenzie
Why not just reboot the system with the option "mem=384" added to the
kernel boot params?

--
Darragh

"Nothing is foolproof to a sufficiently talented fool."
James McKenzie

Can I define how much free memory is reported to an app?

Post by James McKenzie »

Dan Kegel wrote:
On Tue, Mar 11, 2008 at 9:05 PM, James McKenzie
<[email protected]> wrote:
Just for the record, Verbo does not work here either. Too much memory!

I will transfer it to a system with less than 512MB of installed memory
to see if it installs and runs.
Or just reboot your current system and put mem=512M on the
kernel commandline. See 'man bootparam'.

No such program on a Mac. Maybe for Linux, however.

James McKenzie
Locked