feature: add per server edns-client-subnet support

This commit is contained in:
Nick Peng
2023-04-08 22:14:52 +08:00
parent 0f68f0c11d
commit 0947a8dcab
13 changed files with 672 additions and 64 deletions

View File

@@ -45,12 +45,12 @@
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/sysinfo.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <unwind.h>
#include <sys/sysinfo.h>
#define TMP_BUFF_LEN_32 32
@@ -1230,9 +1230,9 @@ void get_compiled_time(struct tm *tm)
unsigned long get_system_mem_size(void)
{
struct sysinfo memInfo;
sysinfo (&memInfo);
long long totalMem = memInfo.totalram;
totalMem *= memInfo.mem_unit;
sysinfo(&memInfo);
long long totalMem = memInfo.totalram;
totalMem *= memInfo.mem_unit;
return totalMem;
}