delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/02/11/09:30:44

Date: Wed, 12 Feb 92 00:50 +1100
From: Bill Metzenthen <APM233M AT vaxc DOT cc DOT monash DOT edu DOT au>
Subject: Increasing the handle limit
To: djgpp AT sun DOT soe DOT clarkson DOT edu, dj AT ctron DOT com
Status: O

> DJ Delorie's message of 11-FEB-1992 03:37:48.01 says:

>Everyone seems to think that calling DOS function 0x67 will increase
>the number of available files.  IT WON'T.  Why?  Because some versions
>of Turbo C have a fixed length array (20) of information about the
>files, and if you open too many, you crash.  Replacing this method is
>on my list of things to do, but it's a major rewrite to transfer the
>Turbo functionality into libc.a.

Can anyone expand upon exactly which versions of Turbo C have the
problem (and which don't) ?

My copy of Turbo C++ v1.0 has this limitation but I have found what
appears to be a quite simple way around the problem (I have briefly tested
it in go32 and it works... without any detected bugs). The limitation in
C++ v1.0 is not in the fixed size of the array (which can easily be
replaced) but is in the file handling code which has a fixed upper limit
built-in.

I have compared the relevant library code of Turbo C++ v1.0 with that of
Turbo C v1.0 (the original version!) and there are no significant differences.
It is therefore probably safe to assume that all versions of Turbo C up to
and including C++ v1.0 behave in exactly the same way. My code should work
for all such versions of Turbo C.

If my code turns out to be applicable to later versions of Turbo C, it
should provide an easy way to increase the file limit of DJGPP.



W Metzenthen
Mathematics Department
Monash University
Melbourne, Victoria, Australia

- Raw text -


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