diff options
Diffstat (limited to 'src/libstate/libstate.cpp')
-rw-r--r-- | src/libstate/libstate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index b461c1ef8..7706cef28 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -14,6 +14,7 @@ #include <botan/internal/mutex.h> #include <botan/internal/mux_noop.h> #include <botan/internal/stl_util.h> +#include <botan/internal/mlock.h> #include <algorithm> #if defined(BOTAN_HAS_SELFTESTS) @@ -252,7 +253,7 @@ void Library_State::initialize(bool thread_safe) config_lock = mutex_factory->make(); cached_default_allocator = 0; - default_allocator_name = "locking"; + default_allocator_name = has_mlock() ? "locking" : "malloc"; add_allocator(new Malloc_Allocator); add_allocator(new Locking_Allocator(mutex_factory->make())); |