diff options
author | lloyd <[email protected]> | 2010-03-13 19:31:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-13 19:31:27 +0000 |
commit | 634f3d27f7faad1dc558821382f71ecc2194637d (patch) | |
tree | dd4e626a4ac3ff5c928460b9e133007023d3321c /src/libstate | |
parent | 1fe724175fdad94d724d401c46b5187f5f539136 (diff) | |
parent | 72a154f3d7eef286b42a116232f8b7be88ccb6d6 (diff) |
propagate from branch 'net.randombit.botan' (head aabb4c3bc2207ceac1920573293b95d138a185df)
to branch 'net.randombit.botan.c++0x' (head 179172dd6952f15f832855f4ec0ac48cb1e08188)
Diffstat (limited to 'src/libstate')
-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 c2e0ae80d..8e18703e6 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -10,6 +10,7 @@ #include <botan/internal/defalloc.h> #include <botan/internal/default_engine.h> #include <botan/internal/stl_util.h> +#include <botan/internal/mlock.h> #include <algorithm> #if defined(BOTAN_HAS_SELFTESTS) @@ -211,7 +212,7 @@ void Library_State::initialize() throw Invalid_State("Library_State has already been initialized"); 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); |