summaryrefslogtreecommitdiff
path: root/lib/theron_allocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/theron_allocator.cpp')
-rw-r--r--lib/theron_allocator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/theron_allocator.cpp b/lib/theron_allocator.cpp
index 23e0fd6..3158159 100644
--- a/lib/theron_allocator.cpp
+++ b/lib/theron_allocator.cpp
@@ -29,7 +29,7 @@
#include <Theron/AllocatorManager.h>
#include <boost/circular_buffer.hpp>
-#define MY_ALLOCATOR_CHUNK_SIZE 96 //Theron asks for a lot of 88-byte buffers
+#define MY_ALLOCATOR_CHUNK_SIZE 256
#define MY_ALLOCATOR_POOL_SIZE (MY_ALLOCATOR_CHUNK_SIZE * (1 << 16))
static struct WorkerAllocator : Theron::IAllocator
@@ -71,7 +71,7 @@ static struct WorkerAllocator : Theron::IAllocator
else
{
//std::cout << "malloc size " << size << std::endl;
- return std::malloc(size);
+ return new char[size];
}
}
@@ -86,7 +86,7 @@ static struct WorkerAllocator : Theron::IAllocator
}
else
{
- std::free(memory);
+ delete [] ((char *)memory);
}
}