-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Description
Examples are doing this:
Line 40 in 39f5c58
| SHOW_MEMORY_USAGE |
which is implemented like this:
Lines 270 to 277 in 39f5c58
| #define SHOW_MEMORY_USAGE \ | |
| do { \ | |
| meminfo_t meminfo; \ | |
| get_memory_usage(meminfo); \ | |
| flint_printf("virt/peak/res/peak(MB): %.2f %.2f %.2f %.2f\n", \ | |
| meminfo->size / 1024.0, meminfo->peak / 1024.0, \ | |
| meminfo->rss / 1024.0, meminfo->hwm / 1024.0); \ | |
| } while (0); |
which calls this:
flint/src/generic_files/profiler.c
Lines 105 to 112 in 39f5c58
| void get_memory_usage(meminfo_t meminfo) | |
| { | |
| FILE * file = fopen("/proc/self/status", "r"); | |
| ulong result; | |
| char line[128]; | |
| while (fgets(line, 128, file) != NULL) |
but /proc/ doesn't exist on macOS.
Metadata
Metadata
Assignees
Labels
No labels