aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/alloc/locking_allocator
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-11-03 22:16:51 +0000
committerlloyd <[email protected]>2014-11-03 22:16:51 +0000
commitbcd83686c3daed38974d1f9b533c07d35c5a7476 (patch)
tree3203d6f30423ebf3b7b5b3d4aa2b9ecc9ce5ba5e /src/lib/alloc/locking_allocator
parentd623823e7e0d2754343ab498f48976e91180d24f (diff)
Various small fixes and cleanups, new is_prime util
Diffstat (limited to 'src/lib/alloc/locking_allocator')
-rw-r--r--src/lib/alloc/locking_allocator/locking_allocator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/alloc/locking_allocator/locking_allocator.cpp b/src/lib/alloc/locking_allocator/locking_allocator.cpp
index 4b66ea018..9ea1235e9 100644
--- a/src/lib/alloc/locking_allocator/locking_allocator.cpp
+++ b/src/lib/alloc/locking_allocator/locking_allocator.cpp
@@ -158,6 +158,12 @@ bool mlock_allocator::deallocate(void* p, size_t num_elems, size_t elem_size)
if(!m_pool)
return false;
+ /*
+ We do not have to zero the memory here, as
+ secure_allocator::deallocate does that for all arguments before
+ invoking the deallocator (us or delete[])
+ */
+
size_t n = num_elems * elem_size;
/*