25 #include <FindDirectory.h>
37 char abspath[B_PATH_NAME_LENGTH];
51 if (abspath_len >= 0 && *
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;
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;
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
uint64_t uv_get_total_memory(void)
void uv_loadavg(double avg[3])
uint64_t uv_get_free_memory(void)
int uv_uptime(double *uptime)
int uv_cpu_info(uv_cpu_info_t **cpu_infos, int *count)
uint64_t uv_get_constrained_memory(void)
int uv_exepath(char *buffer, size_t *size)
int uv_resident_set_memory(size_t *rss)
static const char struct stat static buf struct stat static buf static vhangup int status
ssize_t uv__strscpy(char *d, const char *s, size_t n)
char * uv__strdup(const char *s)
void * uv__malloc(size_t size)
void * uv__calloc(size_t count, size_t size)
static WCHAR * find_path(WCHAR *env)
static PTHREAD_ITEM find_thread(RzDebug *dbg, int tid)