aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/mem_ops.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-19 11:40:23 -0500
committerJack Lloyd <[email protected]>2018-02-19 11:40:23 -0500
commit6baa9c20eb3f4d6ff81b357ff3d5760a7daaad41 (patch)
treed35c63f7e22bbc101918422830456acc0227ec4e /src/lib/utils/mem_ops.h
parent9792c0eb8203a4982d28afebb19b027444753f90 (diff)
Move allocator initializer RAII class to mem_ops.h
May be needed elsewhere
Diffstat (limited to 'src/lib/utils/mem_ops.h')
-rw-r--r--src/lib/utils/mem_ops.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/utils/mem_ops.h b/src/lib/utils/mem_ops.h
index 5fb5752fc..c59c02d5a 100644
--- a/src/lib/utils/mem_ops.h
+++ b/src/lib/utils/mem_ops.h
@@ -37,6 +37,12 @@ BOTAN_PUBLIC_API(2,3) void deallocate_memory(void* p, size_t elems, size_t elem_
*/
void initialize_allocator();
+class Allocator_Initializer
+ {
+ public:
+ Allocator_Initializer() { initialize_allocator(); }
+ };
+
/**
* Scrub memory contents in a way that a compiler should not elide,
* using some system specific technique. Note that this function might