aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-10-21 22:17:48 +0000
committerlloyd <[email protected]>2007-10-21 22:17:48 +0000
commite925d0a03597cc2504e508b7e11d14fb9bf80721 (patch)
tree7a054bd6a6bc0a3addef5d6d93b664cf66f1f2ec /src
parent42fc48730b1e6d320ca64f41e0a6ff3d49395333 (diff)
Have Malloc_Allocator directly inherit from the Allocator interface, without
using the infrastructure in Pooling_Allocator. Using malloc directly is slightly faster than using Botan's memory pools (using the glibc implementation). It may also reduce internal fragmentation, since the current Pooling_Allocator design is rather suboptimal in that regard.
Diffstat (limited to 'src')
-rw-r--r--src/defalloc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/defalloc.cpp b/src/defalloc.cpp
index a4a4727af..f7d880cda 100644
--- a/src/defalloc.cpp
+++ b/src/defalloc.cpp
@@ -50,7 +50,7 @@ void do_free(void* ptr, u32bit n, bool do_lock)
/*************************************************
* Malloc_Allocator's Allocation *
*************************************************/
-void* Malloc_Allocator::alloc_block(u32bit n)
+void* Malloc_Allocator::allocate(u32bit n)
{
return do_malloc(n, false);
}
@@ -58,7 +58,7 @@ void* Malloc_Allocator::alloc_block(u32bit n)
/*************************************************
* Malloc_Allocator's Deallocation *
*************************************************/
-void Malloc_Allocator::dealloc_block(void* ptr, u32bit n)
+void Malloc_Allocator::deallocate(void* ptr, u32bit n)
{
do_free(ptr, n, false);
}