libflint/include/lfmacos.h
Evan Burkey 7fae216ccf
All checks were successful
Test and Deploy / test (push) Successful in 12s
Test and Deploy / docs (push) Successful in 18s
implement reallocarray on macOS
2024-05-06 11:17:34 -07:00

27 lines
597 B
C

#ifndef LIBFLINT_MACOS_H
#define LIBFLINT_MACOS_H
#if defined(__APPLE__) || defined(__MACH__)
#include <time.h>
typedef struct {
double total_user_time;
double total_kernel_time;
double last_total_consumed;
double percent_cpu;
uint64_t virtual_memory;
uint64_t resident_memory;
time_t timestamp;
time_t last_timestamp;
} ProcessData;
ProcessData *new_ProcessData();
int update_process(pid_t pid, ProcessData *proc);
void *reallocarray(void *optr, size_t nmemb, size_t size);
#endif /* defined(__APPLE__) || defined(__MACH__) */
#endif /* LIBFLINT_MACOS_H */