delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/08/14:07:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <DD38D67B9196D31189EC00508B625637450C57@zro01exm01.corp.mot.com>
From: Medve Emilian-EMMEDVE1 <Emilian DOT Medve AT motorola DOT com>
To: cygwin AT sources DOT redhat DOT com
Subject: RE: Bug report: gcc + cygwin
Date: Wed, 8 Nov 2000 21:05:40 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

Thanx for the prompt response. I have some questions regarding your answer.

How CygWin manages the size of fd table since the same program compiled with
-mno-cygwin says that my Windows allows a process to have only 256 files
opened at a time?

You said that I used a terible method to find out the size of fd table. Do
you know a better method? Can you tell it to me?


Best regards,
Emil.

-----Original Message-----
From: Christopher Faylor [mailto:cgf AT redhat DOT com]
Sent: Wednesday, November 08, 2000 6:04 PM
To: cygwin AT sources DOT redhat DOT com
Subject: Re: Bug report: gcc + cygwin


On Wed, Nov 08, 2000 at 05:33:28PM +0200, Medve Emilian-EMMEDVE1 wrote:
>This is my program (it's also attached to this e-mail):
>
>#include<io.h>
>#include<stdio.h>
>#include<stdlib.h>
>
>int main(void)
>{
>        int n=0;
>
>        while(dup(1)!=-1)n++;
>        printf("Size of FILE0 table is: %d.\n",n+3);
>        exit(EXIT_SUCCESS);
>}
>
>Compilation command line: gcc -Wall -o dup dup.c
>
>And this is the output:
>
>d:\Profiles\emmedve1\LOCALS~1\Temp\dup.exe: *** couldn't commit memory for
>cygwi
>n heap, Win32 error 487

In other words, you tried to grow the fd table without bounds and
eventually cygwin ran out of memory.  You can't find the size of the
file table this way.  It's a terrible method for doing this.  Cygwin's
file table doesn't have an upper limit.

Well, I guess 2^32 is probably an upper limit.

>If I use -mno-cygwin everythig works as expected (fine).

Well then, problem solved.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019