www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/05/10:48:13

From: "Sven A. Havemann" <havemann AT uran DOT informatik DOT uni-bonn DOT de>
Message-Id: <9607051642.ZM24979@Terra.informatik.uni-bonn.de>
Date: Fri, 5 Jul 1996 16:42:24 -0600
To: djgpp AT delorie DOT com
Subject: Probs: Virtual mem, V2+4DOS
Cc: havemann AT uran DOT informatik DOT uni-bonn DOT de
Mime-Version: 1.0

Hi everybody!
=============

I seem to have a problem with virtual memory management; to test it, I
wrote a little program allocating and using large amounts of memory (64 million
int-numbers).
The program crashes in plain 4DOS and when used in a MS-DOS box in WIN31;
under win it runs even longer.
It's not *really* urgent, but I feel a little uncomfortable and I'd like
to know whether this happened to anybody.

A more annoying problem is that cwsdpmi and 4dos don't seem to get along
together very well, as during make sometimes the computer suddenly hangs.
What's more, it even hangs sometimes in 4Dos when cwsdpmi is loaded (high).

I have a P75 with 40 Megs of Ram, the VM swap partition is c: (115M free)
and DJGPP is installed on e: (127M free)

Maybe someone has a fix for it.
                                    Thanks anyway, Your's, Sven.


Below: Test output from test program, go32-v2 output, test program.

===================================================================


Plain DOS using 4DOS and CWSDPMI:

...
14240000 bytes allocated & visited
Exiting due to signal SIGSEGV
Page fault at eip=000015ee, error=0006
eax=01019000 ebx=000186a4 ecx=00001dbe edx=00007000 esi=000186a4 edi=0001e344
ebp=0005e31c esp=000565dc cs=00a7 ds=00af es=00af fs=008f gs=00bf ss=00af
Call frame traceback EIPs:
  0x000015ee
  0x0000e4ff

e:\>go32-v2
go32/v2 version 2.0 built Jan 23 1996 22:03:02
Usage: go32 coff-image [args]
Rename this to go32.exe only if you need a go32 that can run v2 binaries as
 well as v1 binaries (old makefiles).  Put ahead of the old go32 in your PATH.
DPMI memory available: 37568 Kb
DPMI swap space available: 115792 Kb



WIN3.1 Dos-Box:

....
44576000 bytes allocated & visited
Virtual memory exceeded in `new'

e:\>go32-v2
go32/v2 version 2.0 built Jan 23 1996 22:03:02
Usage: go32 coff-image [args]
Rename this to go32.exe only if you need a go32 that can run v2 binaries as
 well as v1 binaries (old makefiles).  Put ahead of the old go32 in your PATH.
DPMI memory available: 30832 Kb
DPMI swap space available: 108924 Kb


=====================================================================

#include <iostream.h>
#include <random.h>
#include <values.h>

#define KILLSIZE 8000

int main()
{
   int j,i,*x[KILLSIZE];
   int k,l;

   for(i=0; i<KILLSIZE; i++) {
      x[i]=new int[KILLSIZE];
      for(j=0; j<KILLSIZE; j++) {
         x[i][j]=i+j;
      }
      cout << i*KILLSIZE*sizeof(int) << " bytes allocated & visited" << endl;
   }

   for(i=0; i<100; i++) {
      l=int((double(random())/MAXINT)*KILLSIZE);
      k=int((double(random())/MAXINT)*KILLSIZE);
      cout << l << "," << k << ":      " << x[l][k] << "=" << l+k << endl ;
   }
   return 0;
}

--
-------------------------------------------------------------------------------
 Sven A. Havemann - Rosental 24 - 53111 Bonn - Deutschland - 0049/228/656860
 Keywords:  Polynomial Curves & Surfaces,  Generative Modeling, 4D Animation
FG Computergraphik:
Institut f. Informatik III,             Tel:   (0228) 550-391
Universitaet Bonn                       Fax:   (0228) 550-382
Roemerstr. 164,                         Email: havemann AT graphics DOT cs DOT uni-bonn DOT de
D-53117 Bonn, Deutschland
-------------------------------------------------------------------------------

- Raw text -


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