www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/05/14:06:49

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: how can I limit the amount of RAM available to DJGPP-based program
Date: Tue, 5 Dec 2000 12:43:43
Organization: Aspen Technology, Inc.
Lines: 28
Message-ID: <3a2ce2ff.sandmann@clio.rice.edu>
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10012051644260 DOT 1101-100000 AT localhost DOT localdomain>
NNTP-Posting-Host: dcloan.hou.aspentech.com
X-Trace: selma.aspentech.com 976042676 10042 10.32.115.107 (5 Dec 2000 18:57:56 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 5 Dec 2000 18:57:56 GMT
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

ftp://clio.rice.edu/djgpp/eatmem.exe
ftp://clio.rice.edu/djgpp/eatmem.c

This allows you to arbitrarily consume some amount of DOS memory and > 1Mb memory.
It was designed for use with an EMM provider (EMM386, etc) and requires linking
with the CWSDPMI build directories.  I have an equivalent someplace which works
with raw and/or XMS, but I couldn't find it (it called XMS directly if HIMEM was
present, and hooked both int 15's for memory size if not).  If you could wait
several days I might be able to find it...

This is one of the little utilities tossed together to test CWSDPMI under various
memory environments.

>  I use dos that comes with Win95 OSR2. Can himem.sys be used to control
> amount of memory used by DPMI? Or should I just hack CWSDPMI and rebuild it?
> May be somebody can suggest a patch to CWSDPMI (or at least function
> name/filename to hack in)?

You can either write a program which makes an XMS call before calling your
program to consume some of the memory, or modify valloc.c in cwsdpmi to 
override the memory size returned from XMS.

>  And IMO it seems that limiting amount of RAM is a general purpose task, so
> support for it can be added to cwsparam.exe/cwsdpmi.exe (or solution added to
> FAQ).

I was planning to eventually release my QC suite with the utilities, and that
would be one of them. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019