www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/26/02:38:23

From: John Carter <ECE AT dwaf-hri DOT pwv DOT gov DOT za>
Organization: Dpt Water Affairs & Forestry (IWQS)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Mon, 26 Jun 1995 08:13:58 +0200
Subject: Re: Problems opening > 20 files when using FOPEN

>Please help...
>I felt so lucky with djgpp...no problems all the way..smooth ride until now.
>I cannot open more than 20 files at same time when using FOPEN.
>Working with 486-dos6.2. To use djgpp compiler my app needs to open more than
>20 files. i did what the book said:
>-increased my config to files=60
>-increased handles count in JFT (Job File Table) to 40 using INT21H, func 67H
>
>If i do a low level open using OPEN command, i can open 34 (ex files open 
>by systemm). BUT if i use FOPEN, i cannot open more than 15 files(streams)
>and get an error msg " too many files open"
>Would appreciate if someone could help me. I've tried everything 

Sigh! This is not a DJGPP problem  it is a DOS problem. I tried to do 
the same from the Actor language in Windows and banged my head on the 
same gotcha. (A ten line Qbasic program will verify that the gotcha 
lurks there as well.) 15 files is the abso-blooming-lute maximum 
number of files that one program can have open at one time under 
DOS or Windoze. The trick is each program can have 15 files open upto 
the maximum specified in the FILES=XXX statement in the config.sys.

I had to rewrite my program to slurp all the smaller files into 
memory, and reserve the 15 files the really big files. What a PAIN! 
In 16bit Windoze code I had to do arcane things with global heap that 
kept crashing the system. In DJGPP I just malloc an enor-mouse array 
and stuff all the data in. VM and 32bit code is luvly stuff!


John Carter
Institute for Water Quality Studies. Department of Water Affairs.
Internet : ece AT dwaf-hri DOT pwv DOT gov DOT za
Phone    : 27-12-808-0374x194      Fax : 27-12-808-0338

Have a good day, or else!


(Taglines are automagically selected via pmail variable signature 
feature, don't take offence if it is accidently too appropriate.)

- Raw text -


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