Limit memory of a VC6 application? 
Author Message
 Limit memory of a VC6 application?

Is it possible to limit the amount of memory that can be used by a VC 6
application?

I am asking this because we have an Microsoft Access 95 application and
Access 95 does not run on workstations with 1 GB of RAM or more.

I was wondering if we created a stub VC6 application that launched Access 95
in the VC6 application shell that this could limit it to 512 MB RAM or
something like that and run the Access 95 application within that shell.

If anyone knows if this is possible or has any other ideas, it would be
greatly appreciated.

Thanks in advance.

Scott



Wed, 16 Feb 2005 02:01:02 GMT  
 Limit memory of a VC6 application?
Scott,

If you are developing under Windows NT or 2000 or XP you can create a
special boot configuration to limit how much memory the system can see.

Turn off the "readonly" attribute of C:\boot.ini and edit it. It will look
something like this...

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT2
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000
Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect

This system is configured to dual-boot between 2000 and XP. To limit the
2000 boot to 512 MB of RAM I would copy and paste the 2000 line and add the
/MAXMEM qualifier to the new copy. Also, your should change the description
string so you will know which boot is the memory limited one when you
reboot.

The result for this example will look like this...

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT2
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000 Low
Memory" /MAXMEM=512
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect

Dave Smith


Quote:
> Is it possible to limit the amount of memory that can be used by a VC 6
> application?

> I am asking this because we have an Microsoft Access 95 application and
> Access 95 does not run on workstations with 1 GB of RAM or more.

> I was wondering if we created a stub VC6 application that launched Access
95
> in the VC6 application shell that this could limit it to 512 MB RAM or
> something like that and run the Access 95 application within that shell.

> If anyone knows if this is possible or has any other ideas, it would be
> greatly appreciated.

> Thanks in advance.

> Scott



Wed, 16 Feb 2005 08:07:31 GMT  
 Limit memory of a VC6 application?
We knew of that solution but many of our clients need the full amount of RAM
because they are engineers.

Is it possible to create a hosted VC6 application/shell to limit the RAM?

Thanks

Scott


Quote:
> Scott,

> If you are developing under Windows NT or 2000 or XP you can create a
> special boot configuration to limit how much memory the system can see.

> Turn off the "readonly" attribute of C:\boot.ini and edit it. It will look
> something like this...

> [boot loader]
> timeout=5
> default=multi(0)disk(0)rdisk(0)partition(1)\WINNT2
> [operating systems]
> multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000
> Professional" /fastdetect
> multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP
> Professional" /fastdetect

> This system is configured to dual-boot between 2000 and XP. To limit the
> 2000 boot to 512 MB of RAM I would copy and paste the 2000 line and add
the
> /MAXMEM qualifier to the new copy. Also, your should change the
description
> string so you will know which boot is the memory limited one when you
> reboot.

> The result for this example will look like this...

> [boot loader]
> timeout=5
> default=multi(0)disk(0)rdisk(0)partition(1)\WINNT2
> [operating systems]
> multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000
> Professional" /fastdetect
> multi(0)disk(0)rdisk(0)partition(1)\WINNT2="Microsoft Windows 2000 Low
> Memory" /MAXMEM=512
> multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP
> Professional" /fastdetect

> Dave Smith



> > Is it possible to limit the amount of memory that can be used by a VC 6
> > application?

> > I am asking this because we have an Microsoft Access 95 application and
> > Access 95 does not run on workstations with 1 GB of RAM or more.

> > I was wondering if we created a stub VC6 application that launched
Access
> 95
> > in the VC6 application shell that this could limit it to 512 MB RAM or
> > something like that and run the Access 95 application within that shell.

> > If anyone knows if this is possible or has any other ideas, it would be
> > greatly appreciated.

> > Thanks in advance.

> > Scott



Wed, 16 Feb 2005 09:10:18 GMT  
 Limit memory of a VC6 application?


Quote:
> Is it possible to limit the amount of memory that can be used by a VC 6
> application?

> I am asking this because we have an Microsoft Access 95 application and
> Access 95 does not run on workstations with 1 GB of RAM or more.

> I was wondering if we created a stub VC6 application that launched Access
95
> in the VC6 application shell that this could limit it to 512 MB RAM or
> something like that and run the Access 95 application within that shell.

I don't believe so. I believe the problem is not the available RAM,
but the return values on API calls exceeding the limits Access is
expecting. Paradox 3.5 had a similar problem on DOS machines
with more than 1 MB of RAM. It allocated some internal
table spaces that weren't large enough to contain all the
values needed to track that much memory.

If you can use WinDbg to find out what calls are failing you
_might_ be able to use an injected DLL to patch the export
table for the API calls in question and substitute a function that
indicates there is less memory available.

This is speculation, of course. See Jeff Richter's "Programming
Applications For Windows", chapter 22 for examples of this
kind of thing.



Thu, 17 Feb 2005 02:54:31 GMT  
 Limit memory of a VC6 application?
Have you checked SetProcessWorkingSetSize API?

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net?  http://www.gotdotnet.com



Fri, 18 Feb 2005 13:11:06 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Q: Limiting appilcation memory size

2. console apps: win95 memory limit, pipes, etc.

3. A possible way of limiting the memory ?

4. heap memory limit

5. Exceed memory block limit BSS in module ...?

6. console apps: win95 memory limit, pipes, etc.

7. Memory usage limits

8. memory limit that one process can use ?

9. malloc and memory limits

10. limiting OLEDB memory usage

11. Disabling the Memory-Access-Limits in Win32 Environments

12. Memory limits of CString, CEdit

 

 
Powered by phpBB® Forum Software