• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dealloc and scarce resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dealloc and scarce resources


  • Subject: Re: dealloc and scarce resources
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 30 Jun 2011 04:01:12 -0500

On Jun 30, 2011, at 3:02 AM, Jean-Daniel Dupas wrote:

> Le 30 juin 2011 à 08:19, James Merkel a écrit :
>
>> Ok, I'm looking at my application in Instruments File Activity. The column labeled FD I assume means file descriptors. Is that the total number of FDs in use at any given time?
>
> No, Just like process ID, file descriptor number can be reused by the system.

That analogy is a bit flawed.  Process IDs are global across the system.  File descriptors are per-process.

> And there is absolutely no guarantee the system use simple incremental value for fd AFAIK.

Actually, when a new file descriptor is created for your process, it does use the lowest unused descriptor number (except for dup2()).

Still, the File Activity instrument's event list isn't showing a count of file descriptors, it's showing the specific individual file descriptor involved in the specific event.  But there's a pretty good chance that the highest file descriptor you see across a significant range of events roughly indicates the count of open descriptors.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: dealloc and scarce resources
      • From: James Merkel <email@hidden>
References: 
 >dealloc and scarce resources (From: James Merkel <email@hidden>)
 >Re: dealloc and scarce resources (From: Quincey Morris <email@hidden>)
 >Re: dealloc and scarce resources (From: James Merkel <email@hidden>)
 >Re: dealloc and scarce resources (From: Kyle Sluder <email@hidden>)
 >Re: dealloc and scarce resources (From: James Merkel <email@hidden>)
 >Re: dealloc and scarce resources (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: dealloc and scarce resources
  • Next by Date: Scaling CALayer produces blurry/distorted text
  • Previous by thread: Re: dealloc and scarce resources
  • Next by thread: Re: dealloc and scarce resources
  • Index(es):
    • Date
    • Thread