mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Try to avoid OOM killer on low-memory systems without swap.
Benchmark for memory-hard KDF is tricky, seems that relying on maximum half of physical memory is not enough. Let's allow only free physical available space if there is no swap. This should not cause changes on normal systems, at least.
This commit is contained in:
@@ -168,6 +168,8 @@ int crypt_uuid_cmp(const char *dm_uuid, const char *hdr_uuid);
|
||||
size_t crypt_getpagesize(void);
|
||||
unsigned crypt_cpusonline(void);
|
||||
uint64_t crypt_getphysmemory_kb(void);
|
||||
uint64_t crypt_getphysmemoryfree_kb(void);
|
||||
bool crypt_swapavailable(void);
|
||||
|
||||
int init_crypto(struct crypt_device *ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user