Re: APIs to determine swap size and used swap?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jun 1, 2005, at 11:22 AM, Glen Beane wrote: 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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) This email sent to site_archiver@lists.apple.com
participants (1)
-
Mike Smith