• 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
What determines VSIZE allocation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What determines VSIZE allocation?


  • Subject: What determines VSIZE allocation?
  • From: "Tobias Zimmerman" <email@hidden>
  • Date: Wed, 14 Jan 2009 17:31:32 -0500

I have searched for an answer to this question, including in Amit Singh's
book, but have not found the answer (at least, not in a form that I
recognize it).
I have a fairly simple Cocoa app that creates an NSStatusItem with a small
menu.  It is compiled using Garbage Collection and in 64bit mode (it
identifies in the Activity Monitor as "Intel(64 bit)".

In non-debug mode it basically just sits there.  The active memory usage is
quite reasonable -- about 4.5 to 7.5MB of RPRVT, 10MB RSIZE and 23-30MB
RSHRD.  However, the VSIZE is 8.36GB ("giga", with a "G").  Compiling in
32bit mode drops VSIZE to 475MB, which is still an awful lot for such a
small app.

I know there are people who will say "VSIZE doesn't matter if there is no
paging", but if I ever sought to distribute my app people will not want to
install a statusitem that looks like a memory hog.

My question is two-fold:  (1) How does the OS determine how much to allocate
to VSIZE? and (2) is there something I am doing wrong in my app (likely)
that is causing the out-sized allocation?

I am a newbie w/r/t cocoa and objective-C, but I have read the article on
garbage collection and tried to understand and apply it.
_______________________________________________

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: What determines VSIZE allocation?
      • From: "Michael Ash" <email@hidden>
    • Re: What determines VSIZE allocation?
      • From: Bill Bumgarner <email@hidden>
    • Re: What determines VSIZE allocation?
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Text field with buttons like the To field in Mail
  • Next by Date: ImageAndTextCell + NSOutlineView editing problem
  • Previous by thread: Re: Text field with buttons like the To field in Mail
  • Next by thread: Re: What determines VSIZE allocation?
  • Index(es):
    • Date
    • Thread