From 863b16e7043ee39674e8f0bbea4c7d5accfaf9a5 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 12 Aug 2019 14:05:46 +0200 Subject: Improve scalloc error message --- src/allocators/scalloc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/allocators/scalloc.py b/src/allocators/scalloc.py index f2f15b4..6d1b0dd 100644 --- a/src/allocators/scalloc.py +++ b/src/allocators/scalloc.py @@ -30,8 +30,11 @@ class Scalloc (Allocator): def build(self): with open("/proc/sys/vm/overcommit_memory", "r") as f: if f.read()[0] != "1": - print_error("Scalloc needs permission to overcommit_memory") - raise AssertionError("vm.overcommit_memory not set") + raise AssertionError("""\ +vm.overcommit_memory not set +Scalloc needs permission to overcommit_memory. +sysctl vm.overcommit_memory=1 +""") return super().build() -- cgit v1.2.3