int mach_init() { vm_statistics_data_t vm_stat; kern_return_t kr; #undef mach_task_self /* * Get the important ports into the cached values, * as required by "mach_init.h". */ mach_task_self_ = mach_task_self(); /* * Initialize the single mig reply port */ mig_init(0); /* * Cache some other valuable system constants */ (void) vm_statistics(mach_task_self_, &vm_stat); vm_page_size = vm_stat.pagesize; mach_init_ports(); return(0); }
int mach_init() { kern_return_t kr; #undef mach_task_self /* * Get the important ports into the cached values, * as required by "mach_init.h". */ mach_task_self_ = mach_task_self(); /* * Initialize the single mig reply port */ mig_init(0); /* * Cache some other valuable system constants */ (void) host_page_size(mach_host_self(), &vm_page_size); return(0); }