Re: APIs to determine swap size and used swap?
Re: APIs to determine swap size and used swap?
- Subject: Re: APIs to determine swap size and used swap?
- From: Mike Smith <email@hidden>
- Date: Wed, 1 Jun 2005 12:08:39 -0700
On Jun 1, 2005, at 11:22 AM, Glen Beane wrote:
I'm porting more of an applications functionality to Darwin, and
one thing I need to be able to do is have the application
determine how much swap is available on the machine and how much of
that swap is actually being used.
There isn't an upper bound on available swap space; swap can be
provided by a number of different mechanisms although typically it is
only offered by the dynamic_pager task out of free space on the root
volume.
There's no summary information kept on swap space in use either;
there are really three different numbers that you would be interested
in:
- How much file space is occupied by swap; you can look at the
swapfile* files in /var/vm for that (swap space reserved)
- How much swap space is allocated to back pages (swap space
allocated)
- How much swap space is holding pages for which there is no in-
core copy (swap space in use)
AFAIK there is no good way to obtain the second and third values.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden