util: add phys_memory.h for all memory measurements

Move the os_get_total_physical_memory function from gallium to util,
simplify it (all BSDs support sysconf, no need for sysctl),
use it in gallium, anv, dri/i915, dri/i965 and dri/swrast.
42 jobs for !1619 with phys-memory in 38 minutes and 21 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Container
passed #1746303
aarch64
arm_build

00:00:18

passed #1746304
aarch64
arm_test

00:00:25

passed #1746300
x86_build

00:00:21

passed #1746302
x86_build_old

00:00:24

passed #1746301
x86_test-gl

00:00:21

 
  Build
passed #1746308
aarch64
meson-arm64

00:08:58

passed #1746307
aarch64
meson-armhf

00:09:34

passed #1746309
meson-clang

00:08:57

passed #1746312
meson-clover

00:06:32

passed #1746313
meson-clover-old-llvm

00:11:44

passed #1746315
meson-i386

00:02:36

passed #1746306
meson-main

00:07:58

passed #1746318
meson-mingw32-x86_64

00:03:59

passed #1746317
gstreamer
meson-ppc64el

00:04:29

passed #1746316
gstreamer
meson-s390x

00:06:00

passed #1746305
meson-testing

00:05:21

passed #1746314
meson-vulkan

00:03:38

passed #1746319
scons

00:06:18

passed #1746320
scons-old-llvm

00:04:30

passed #1746310
scons-swr

00:03:02

passed #1746311
scons-win64

00:09:04

 
  Test
passed #1746340
db410c
arm64_a306_gles2

00:06:32

passed #1746337
mesa-cheza
arm64_a630_gles2

00:01:46

passed #1746339
mesa-cheza
arm64_a630_gles3

00:06:16

passed #1746338
mesa-cheza
arm64_a630_gles31

00:04:20

passed #1746325
lava-meson-gxl-s905x-libretech-cc
lima-mali450-test:arm64

00:09:42

passed #1746341
llvmpipe-traces

00:00:54

passed #1746321
lava-sun50i-h6-pine-h64
panfrost-t720-gles2:arm64

00:10:22

passed #1746322
lava-rk3288-veyron-jaq
panfrost-t760-gles2:armhf

00:05:37

passed #1746323
lava-rk3399-gru-kevin
panfrost-t860-gles2:arm64

00:04:18

passed #1746324
lava-rk3399-gru-kevin
panfrost-t860-gles3:arm64

00:05:06

passed #1746327
piglit-glslparser

00:04:52

passed #1746326
piglit-quick_gl

00:09:03

passed #1746328
piglit-quick_shader

00:06:10

passed #1746329
test-llvmpipe-gles2

00:04:12

passed #1746330
test-softpipe-gles2

00:01:49

passed #1746333
test-softpipe-gles31 1/4

00:03:14

passed #1746331
test-softpipe-gles3 1/2

00:04:01

passed #1746334
test-softpipe-gles31 2/4

00:04:15

passed #1746335
test-softpipe-gles31 3/4

00:05:08

passed #1746336
test-softpipe-gles31 4/4

00:03:28

passed #1746332
test-softpipe-gles3 2/2

00:07:55