Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey) To: "Nirmal Prasad" Cc: Subject: Re: File handle limit in msvcrt Date: Wed, 12 May 1999 15:21:58 GMT Organization: Never Reply-To: jeffdbREMOVETHIS AT goodnet DOT com Message-ID: <373d9c2f.60210881@mail.goodnet.com> References: <003101be9c81$4d155330$0f0a0181 AT devel014> In-Reply-To: <003101be9c81$4d155330$0f0a0181@devel014> X-Mailer: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From msdc vc++ docs The _setmaxstdio function changes the maximum value for the number of files which may be simultaneously open at the stdio level. C run-time I/O now supports many more open files on Win32 platforms than in previous versions. Up to 2,048 files may be open simultaneously at the lowio level (that is, opened and accessed by means of the _open, _read, _write, and so forth family of I/O functions). Up to 512 files may be open simultaneously at the stdio level (that is, opened and accessed by means of the fopen, fgetc, fputc, and so forth family of functions). The limit of 512 open files at the stdio level may be increased to a maximum of 2,048 by means of the _setmaxstdio function. Since stdio level functions, such as fopen, are built on top of the lowio functions, the maximum of 2,048 is a hard upper limit for the number of simultaneously open files accessed through the C run-time library. Note This upper limit may be beyond what is supported by a particular Win32 platform and configuration. Stream I/O Routines On Wed, 12 May 1999 10:11:15 -0400, you wrote: >hi, > >i just happened to find this piece of information regarding file handle >limits in msvcrt.dll > >"The C run-time libraries have a preset limit for the number of files that >can be open at any one time. The limit for applications that link with the >single-thread static library (LIBC.LIB) is 64 file handles or 20 file >streams. Applications that link with either the static or dynamic >multithread library (LIBCMT.LIB or MSVCRT.LIB and MSVCRT.DLL), have a limit >of 256 file handles or 40 file streams. Attempting to open more than the >maximum number of file handles or file streams causes program failure." > >i know mingw uses the msvcrt.dll and hence should have the above limitation >but what about cygwin which uses glibc? Just curious ... i dont think there >is any operating system limitation may be some TLS issue from Microsoft or >some other stuff like that.. > >Regards > >Nirmal Prasad R. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com