• 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: Cocoa-dev Digest, Vol 6, Issue 86
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 6, Issue 86


  • Subject: Re: Cocoa-dev Digest, Vol 6, Issue 86
  • From: "Tobias Zimmerman" <email@hidden>
  • Date: Fri, 16 Jan 2009 00:19:27 -0500

>
> > On Thu, Jan 15, 2009 at 1:59 AM, Bill Bumgarner <email@hidden> wrote:
> >>
> >> For example, an application's VSIZE might be growing over time
> >> because it is
> >> mmap()'ing a bunch of files (or a few small files).   If the app
> >> fails to
> >> unmap, the VSIZE will grow and the app may likely exhaust its
> >> address space
> >> without any paging activity.
> >>
> >> Example: for applications that are processing large files -- ID3
> >> tag editors
> >> come to mind -- watching the VSIZE can be a useful way of
> >> determining if
> >> your code is properly managing the mapping of said files.
> >
> > All good points. However what I meant by "system resources" was that
> > VSIZE, while it may indicate misbehavior in your process, never
> > indicates misbehavior that could affect the system as a whole. An app
> > with a runaway RSIZE can quickly run you into swap hell. An app with
> > runaway CPU usage can make everything else slow. But VSIZE is at most
> > an internal problem. That's all I meant to indicate.
>
> The kernel still needs to keep track of those VSIZE allocations.
> Perhaps in 64-bit if you mmap() a small file a few billion times then
> the kernel will exhaust some resource or clobber some algorithm's
> performance. (Also I bet `top` will be really slow.)
>
> But yes, in general VSIZE either is not a problem or is only a local
> problem.
>


I am grateful to everyone who has responded, and, as I expected, many concur
that VSIZE is a (largely) meaningless statistic.  However, I am still not
entirely satisfied with the answer to my first question, which is: How does
the OS determine what to allocate for the VSIZE.  One answer suggested that
64-bit apps will receive 8GB, but I note that the Apache daemon (httpd) runs
in 64-bit mode and is allocated on a few tens-of-megabytes (around 25MB per
instance on my machine).  Is that because it does not have a GUI and is not
written in Obj-C?

If the outsized VSIZE does indicate "misbehavior in [my] process", what are
the types of things I should look for?  I don't have any memory leaks (that
I can see -- the app runs for hours without increasing its memory
consumption, and nothing obvious appears in instruments).  I am not creating
hundreds of objects, and I have a limited number of classes in my app.
_______________________________________________

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: Cocoa-dev Digest, Vol 6, Issue 86
      • From: Nick Zitzmann <email@hidden>
    • Re: Cocoa-dev Digest, Vol 6, Issue 86
      • From: Ashley Clark <email@hidden>
  • Prev by Date: Re: Manipulating QC input ports with QCRenderer
  • Next by Date: Re: Cocoa-dev Digest, Vol 6, Issue 86
  • Previous by thread: Re: detecting touches not from a view/window on iphone
  • Next by thread: Re: Cocoa-dev Digest, Vol 6, Issue 86
  • Index(es):
    • Date
    • Thread