Mail Archives: djgpp/1996/02/12/17:05:57
In a recent posting (on another subject), Charles Sandman said:
> The default setup will handle up to 255 handles, so you can open like 249
> files. Yes, I tested it and was able to open this many. No changes
> should be required, except a files statement in the config.sys (make it
> at least 60).
I have just started getting the ENFILE error (or is it "EMFILE"? - I
think that maybe it is one way in the code, and another way in the
info), with far fewer than 249 files. My config.sys value is
sufficiently large. When I look through the source, I find a manifest
constant with a name like FILE_REC_MAX #define'd to the value 20 (in a
file somewhere like ../include/libc/local.h - sorry to be vague but I
am not near my DOS machine). It is my impression that this may be a
limit. I have not yet tried to re-build the library after changing
this define, though will do so shortly. in the meantime, I wonder if
this must really be a fixed size? I would think that either the
start-up code could look up the DOS value, and malloc to match it, or
that the _alloc_file function could malloc more descriptor space "on
the fly". Since I did not study the code, there are probably good
reasons why this could not be done, but in my ignorance, it looks
possible.
Keep up the good work,
Andy Szymkowiak
X-ray Astrophysics Branch
NASA/GSFC
- Raw text -