use /proc/self/statm to get current usage

This commit is contained in:
crapStone 2024-03-15 20:35:39 +01:00
parent a9b6615286
commit bb41a4abfa
3 changed files with 35 additions and 13 deletions

View file

@ -140,8 +140,8 @@ var (
},
&cli.Uint64Flag{
Name: "memory-limit",
Usage: "maximum size of memory in bytes to use for caching, default: 512MB",
Value: 512 * 1024 * 1024,
Usage: "maximum size of memory in KiB to use for caching, default: 512MiB",
Value: 512 * 1024,
EnvVars: []string{"MAX_MEMORY_SIZE"},
},