25 #include <FindDirectory.h>
37 char abspath[B_PATH_NAME_LENGTH];
44 status =
find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH, NULL, abspath,
51 if (abspath_len >= 0 && *
size > (
size_t)abspath_len)
52 *
size = (size_t)abspath_len;
62 status = get_system_info(&sinfo);
66 return (sinfo.max_pages - sinfo.used_pages) * B_PAGE_SIZE;
74 status = get_system_info(&sinfo);
78 return sinfo.max_pages * B_PAGE_SIZE;
99 while (get_next_area_info(
thread.team, &cookie, &area) == B_OK)
100 *rss += area.ram_size;
108 *uptime = (double)system_time() / 1000000;
114 cpu_topology_node_info* topology_infos;
122 if (cpu_infos == NULL ||
count == NULL)
125 status = get_cpu_topology_info(NULL, &topology_count);
129 topology_infos =
uv__malloc(topology_count *
sizeof(*topology_infos));
130 if (topology_infos == NULL)
133 status = get_cpu_topology_info(topology_infos, &topology_count);
140 for (
i = 0;
i < (
int)topology_count;
i++) {
141 if (topology_infos[
i].
type == B_TOPOLOGY_CORE) {
142 cpuspeed = topology_infos[
i].data.core.default_frequency;
149 status = get_system_info(&system);
153 *cpu_infos =
uv__calloc(system.cpu_count,
sizeof(**cpu_infos));
154 if (*cpu_infos == NULL)
158 cpu_info = *cpu_infos;
159 for (
i = 0;
i < (
int)system.cpu_count;
i++) {
161 cpu_info->
speed = (
int)(cpuspeed / 1000000);
164 *
count = system.cpu_count;