Add short list to HSFV_manage

This commit is contained in:
eddyem
2018-03-25 10:50:23 +03:00
parent bf4ea0c493
commit b73587a5e4
15 changed files with 889 additions and 112 deletions

14
get_avail_mem.c Normal file
View File

@@ -0,0 +1,14 @@
#include <stdio.h>
#include <unistd.h>
static unsigned long long get_available_mem(){
return sysconf(_SC_AVPHYS_PAGES) * (unsigned long long) sysconf(_SC_PAGE_SIZE);
}
int main(){
unsigned long long m = get_available_mem();
printf("MEM: %llu == %lluGB\n", m, m/1024/1024/1024);
return 0;
}
// Never allocate memory by big pieces with malloc! Only mmap with MAP_POPULATE!!!!!!!!!11111111111