delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/04/10:45:57

To: mrb AT robots DOT ox DOT ac DOT uk
Cc: sandmann AT clio DOT rice DOT edu (Charles Sandmann),
djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Subject: Re: Disabling use of disk as free store.
Date: Sun, 04 Dec 94 16:55:08 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

> 	Is there a way of telling djgpp/gcc/go32 NOT to use the disk
> as free store when it runs out of memory (I mean when the compiled
> program is running and you ask for too much memory with a "new")?
> Frankly I would rather my program exited immediately when it ran out
> of memory rather than continue at snails pace using the disk (although

There is no official way to do this, but if you run the program
in DPMI mode under Quarterdeck's QDPMI server, the virtual memory is
effectively disabled (due to a bug in QDPMI).  In fact, if memory
serves, there is a command to disable virtual memory services of
QDPMI, so maybe you can have this behavior in a documented way.
(QDPMI is a DPMI server which comes with QEMM386 memory manager.)
To run your program in DPMI mode, load QDPMI and be sure your
GO32 environment variable doesn't say ``nodpmi'' among other things.
Then you will get an allocation failure when you try to allocate
more memory than is physically available.
The down-side of this is that graphics won't work in DPMI mode
in v1.12.

Charles, how about the possibility of adding an option to CWSDPMI
that will enable switching virtual memory OFF in v2.0?

- Raw text -


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