Re: VSIZE, apps without AppKit
Re: VSIZE, apps without AppKit
- Subject: Re: VSIZE, apps without AppKit
- From: Douglas Davidson <email@hidden>
- Date: Fri, 5 Apr 2002 15:03:04 -0800
On Friday, April 5, 2002, at 02:01 PM, Angela Brett wrote:
I wrote a Foundation Tool, which I have now put into an Application
solely so that it can be added as a Login Iten. I've removed all
remnants of the AppKit from the project, since I don't need it and as
soon as I use anything from the AppKit the VSIZE (as mentioned in top)
goes up to about 30 or 50MB. I don't know ir that's really a bad thing,
but it seems quite wasteful for something which is meant to be running
all the time, and which doesn't actually need anything from the AppKit.
That's my first question... if I do use the AppKit in this program, how
much difference does that really make? Will that extra size slow down
the system at all?
VSIZE is the total size of your application's address space. This has
almost nothing to do with the burden your application is placing on your
machine's memory resources. If you link against the AppKit, then a
number of frameworks are mapped into your application's memory space,
but (a) all that code is shared among all of the apps that use it, and
(b) a given page takes up actual real memory only if it is being used.
I believe that in the current implementation, even the memory maps for
the frameworks are shared. The main thing to watch VSIZE for is to see
if it increases over time--that is one sign of a leak.
A better measure of the usage of your application would probably be
RPRVT. This is resident private memory, i.e. real memory used only by
your application. That said, you will probably notice an increase in
RPRVT if you use additional frameworks, and certainly it is better not
to link against frameworks you do not use. The problems you were having
sounded like they could be worked around, if you find that there is a
noticeable cost to using the AppKit, but I think it's your call to make.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.