www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/27/13:20:26

Date: Wed, 27 Sep 1995 12:48:55 -0400 (EDT)
From: Paw Mullit <paw AT edsel DOT cbt DOT nist DOT gov>
Subject: Some "stupid" questions from a new user
To: djgpp-maillist <djgpp AT sun DOT soe DOT clarkson DOT edu>

I'm planning on installing DJGPP on my PC (with QEMM7.04 and the buggy 
DPMI (normally disabled), and a lot of diskspace and memory), because I 
prefer PCs DOS to UNIX (no intention on religios wars here!), but since  
some af my programs will need to run on heavy UNIX-machines because of  
the calculation time, it's essential that the porting problem is almost  
non-existing.
The programs are relatively simple (mainly ANSI but some CPP), the main 
problem is that I'm using a lot of large arrays and perform heavy math  
computations on them.
A typical skeleton of a program would look like this (simplified!):

-------------------------------
#include<stdio.h>
#include<string.h>
#include<malloc.h>
#include<math.h>
#define arraysize 1000000
int intarray[arraysize];
float floatarray[4][arraysize];
functions...
main(){
  calling functions...
}
--------------------------------

Q1: Will DJGPP "eat" a program like this, or do I need some special includes?
Q2: Will the array(s) be placed/swapped on disk if I'm short on memory 
    (that's not a problem, as long as I can use the array!)? 
Q3: Do I need to worry about implementing DPMI-calls myself, when I'm 
    using/allocating these large arrays, or is the memoryallocation  
    "invisible" for me?

NB: I've studied the FAQ (chap. 15), but it's better to be absolutely  
sure :-) Sorry if I'm wasting some bandwidth.

/Paw Mullit
p.t. National Institute of Standards and Technology, Maryland

- Raw text -


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