[openbeos] Re: Threading and File Descriptors

  • From: François Revol <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 19 Aug 2002 09:26:54 +0200 (MEST)

En réponse à Scott MacMaster <zqxh@xxxxxxx>:

> > >Or we could as well be able to change some (MAX_FD) at runtime, so
> increasing
> > >it just before running critical progs (there is a defined interface
> for
> this,
> > >called ulimit()).
> >
> > This is more tempting.
> 
> If this could be made to be adjustable at runtime then it would make
> more
> sense for the 'critical app' to call a function to adjust this value
> instead.  I believe, this method would also allow you to have
> different
> lookup algorithms for each process.  The process would just set the
> expected
> number of file descriptors of something like that.  Then, you'd have
> the
> most efficient lookup for each process.
> 

The array would then be atomically copied to a malloc()ed block, and 
replaced with the new one bigger...

sounds not so dumb as it was first...

François.

Other related posts: