Back to index

glibc  2.9
Functions
sysinfo.h File Reference

Go to the source code of this file.

Functions

int __get_nprocs_conf (void)
int __get_nprocs (void)
long int __get_phys_pages (void)
long int __get_avphys_pages (void)
long int __get_child_max (void)

Function Documentation

long int __get_avphys_pages ( void  )

Definition at line 82 of file getsysstats.c.

{
  vm_statistics_data_t vs;
  kern_return_t err;

#ifdef HOST_VM_INFO
  {
    mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
    err = __host_info (__mach_host_self (), HOST_VM_INFO,
                     (host_info_t) &vs, &count);
    if (!err && count < HOST_VM_INFO_COUNT)
      err = EGRATUITOUS;
  }
#else
  err = __vm_statistics (__mach_task_self (), &vs);
#endif
  if (err)
    return __hurd_fail (err);

  return vs.free_count;
}

Here is the call graph for this function:

Here is the caller graph for this function:

long int __get_child_max ( void  )

Definition at line 25 of file get_child_max.c.

{
  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int __get_nprocs ( void  )

Definition at line 46 of file getsysstats.c.

{
  struct host_basic_info hbi;
  kern_return_t err;
  mach_msg_type_number_t cnt = HOST_BASIC_INFO_COUNT;

  err = __host_info (__mach_host_self (), HOST_BASIC_INFO,
                   (host_info_t) &hbi, &cnt);
  if (err)
    return __hurd_fail (err);
  else if (cnt != HOST_BASIC_INFO_COUNT)
    return __hurd_fail (EIEIO);

  return hbi.avail_cpus;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int __get_nprocs_conf ( void  )

Definition at line 25 of file getsysstats.c.

{
  /* We don't know how to determine the number.  Simply return always 1.  */
  return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

long int __get_phys_pages ( void  )

Definition at line 64 of file getsysstats.c.

{
  struct host_basic_info hbi;
  kern_return_t err;
  mach_msg_type_number_t cnt = HOST_BASIC_INFO_COUNT;

  err = __host_info (__mach_host_self (), HOST_BASIC_INFO,
                   (host_info_t) &hbi, &cnt);
  if (err)
    return __hurd_fail (err);
  else if (cnt != HOST_BASIC_INFO_COUNT)
    return __hurd_fail (EIEIO);

  return hbi.memory_size / __vm_page_size;
}

Here is the call graph for this function:

Here is the caller graph for this function: