maximum open files (was FILE *fp[];)

Chris Torek chris at mimsy.umd.edu
Wed Nov 28 15:06:09 AEST 1990


In article <9704 at hydra.Helsinki.FI> wirzeniu at cs.Helsinki.FI
(Lars Wirzenius) writes:
>In ANSI-systems the macro FOPEN_MAX (defined in <stdio.h>) tells the
>maximum number of files that you can have open simultaneously.

This is actually a `minimum maximum', i.e., the implementation guarantees
that (if you stick to strictly conforming C) you will be able to open
at least that many files.  For instance, my stdio defines it as 20,
since if you use up all free memory with malloc() you will not be able
to open a 21st file, even though the O/S may allow it.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list