Swap: support freebsd

This commit is contained in:
李通洲
2022-10-26 17:29:53 +08:00
parent aca2c01c9e
commit 64b9f69fb1
+3 -1
View File
@@ -1,6 +1,8 @@
#include "swap.h"
#include "common/sysctl.h"
void ffDetectSwapImpl(FFMemoryStorage* swap)
{
ffStrbufAppendS(&swap->error, "Not implemented");
swap->bytesTotal = (uint64_t)ffSysctlGetInt64("vm.swap_total", 0);
swap->bytesUsed = (uint64_t)ffSysctlGetInt64("vm.swap_reserved", 0);
}