Article View: comp.os.os2.programmer
Article #3264Re: # of File Handles?
From: Bruce Kitchin
Date: Mon, 04 Jan 1993 21:23
Date: Mon, 04 Jan 1993 21:23
31 lines
2169 bytes
2169 bytes
Andrew Lighten (Andrew.Lighten@f383.n634.z3.fidonet.org) wrote: : HXC6@psuv>From: H. Choe <HXC6@psuvm.psu.edu> : HXC6@psuv>Organization: Penn State University : HXC6@psuv> : HXC6@psuv>Hi. I want to open a bunch of files simultaneously in my fortran : HXC6@psuv>(Watcom F77/386) program. Here are questions: : HXC6@psuv>(1) What is the default number of files handles? : HXC6@psuv>(2) How to set the number of file handles? (Is there something : HXC6@psuv> similar to FILES=xx [in config.sys for dos] for OS/2?) Or, : HXC6@psuv> do I misunderstand something? : HXC6@psuv>Thanks. : : (1) No idea at all. Never bumped into it. : : (2) You can do it dynamically. Look at the DosSetMaxFH() function. The : FILES=n statement in your OS/2 config.sys file is for DOS apps. : In DOS there were two problems: the number of file handles total per system, and the number that one program could open. It appears that OS/2 does not put a small limit on the first and provides no way to change it that I have seen. However, there is apparently a limit per program which DosSetMaxFH() adjusts. However there can be a third problem. In C, there is a structure setup by the Run Time library in some compilers that must allocate a fix space for all files. With MSC, there was a couple of source modules that had to have a constant redefined and be recompiled to allow the C run time library access more than the default of 20 files even AFTER telling the operating system to allow more. I have no idea if Watcom F77/386 has this sort of problem or not. If they do, there may be something in the documentation or in some sort of Readme file. With MSC you had to find it is the readme documentation.
Technical Details
Message-ID:
<1ia9rnINN4i@hpscit.sc.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!sdd.hp.com!hpscit.sc.hp.com!kitchinReferences:
<726186884.AA09589@csource.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!sdd.hp.com!hpscit.sc.hp.com!kitchin From: kitchin@lf.hp.com (Bruce Kitchin) Newsgroups: comp.os.os2.programmer Subject: Re: # of File Handles? Date: 4 Jan 1993 21:23:03 GMT Organization: Hewlett Packard Santa Clara Site Lines: 31 Message-ID: <1ia9rnINN4i@hpscit.sc.hp.com> References: <726186884.AA09589@csource.oz.au> NNTP-Posting-Host: eden.avo.hp.com X-Newsreader: TIN [version 1.1.2 PL7]