delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/05/09:00:40

Date: Tue, 5 Dec 2000 15:59:04 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Vlad Harchev <hvv AT hippo DOT ru>
cc: djgpp AT delorie DOT com
Subject: Re: how can I limit the amount of RAM available to DJGPP-based program
In-Reply-To: <Pine.LNX.4.10.10012051644260.1101-100000@localhost.localdomain>
Message-ID: <Pine.SUN.3.91.1001205155355.29415K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 5 Dec 2000, Vlad Harchev wrote:

>  I need to test how one program (that uses DJGPP environment) will work when
> certain amount of RAM is available (not some total amount of virtual memory,
> but amount of RAM available). And that amount of RAM is fewer than PC I'm
> going to test it on has. That program needs to operate without using swap
> file.

Disable paging in CWSDPMI by running CWSPARAM and pointing the swap file 
to a non-existent drive.  Then spawn your program from another DJGPP 
program which allocates some of the memory and locks it.  Compute the 
amount of memory to allocate in the parent program so that what's left is 
the amount of RAM for which you want to test your program.

>  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 wouldn't expect many users to try to limit the amount of RAM.  I don't 
think I ever saw such a question posted here; it certainly isn't a 
frequent one.  So it definitely doesn't belong to the FAQ.

- Raw text -


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