host_statistics64 become blocking under iOS 11

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

host_statistics64 become blocking under iOS 11

Postby Stephen658 » Tue Apr 30, 2019 4:33 am

I used the code in Watching memory usage in iOS to get free memoty for years. But something went wrong since iOS 11 was born. The host_statistics64 will be blocked for 0 to 3 seconds if it is called from two threads simultaneously.

    It won't be blocking before iOS 11 and still not fixed in iOS 11.0.2.
    It won't be blocking under iOS 11 only when it is called from one thread only.

It is might a new bug introduced since iOS 11. But what I am focusing is how to get round of it since many clients have updated to it already.

According to, we can use sysctl/vm.vm_page_free_targe to get the free memory size under OS/X except for iOS.

Any idea?
Posts: 1
Joined: Fri Apr 26, 2019 5:13 am

Return to Questions and Answers

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests