Fix for OSX

This commit is contained in:
Valentino Orlandi 2024-02-17 00:29:13 +01:00
parent 8c179a05ce
commit 7ce712b193
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ size_t availableMemory() {
mach_msg_type_number_t count{ HOST_VM_INFO_COUNT };
vm_statistics_data_t vmstat;
if ( host_statistics( mach_host_self(), HOST_VM_INFO, (host_info_t)&vmstat, &count ) != KERN_SUCCESS ) {
throw DoNotCatchException("Failed to get host infos",);
throw DoNotCatchException("Failed to get host infos", "failed");
}
const natural_t n_pages{ vmstat.free_count };
const long page_size{ sysconf( _SC_PAGE_SIZE ) };