home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7313 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.1 KB

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