aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mem_pool.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mem_pool.cpp b/src/mem_pool.cpp
index 67da88a14..faf399ec6 100644
--- a/src/mem_pool.cpp
+++ b/src/mem_pool.cpp
@@ -42,16 +42,6 @@ Pooling_Allocator::Memory_Block::Memory_Block(void* buf)
}
/*************************************************
-* Compare a Memory_Block with a void pointer *
-*************************************************/
-inline bool Pooling_Allocator::Memory_Block::operator<(const void* other) const
- {
- if(buffer <= other && other < buffer_end)
- return false;
- return (buffer < other);
- }
-
-/*************************************************
* See if ptr is contained by this block *
*************************************************/
bool Pooling_Allocator::Memory_Block::contains(void* ptr,
@@ -207,7 +197,7 @@ void Pooling_Allocator::deallocate(void* ptr, u32bit n)
const u32bit block_no = round_up(n, BLOCK_SIZE) / BLOCK_SIZE;
std::vector<Memory_Block>::iterator i =
- std::lower_bound(blocks.begin(), blocks.end(), ptr);
+ std::lower_bound(blocks.begin(), blocks.end(), Memory_Block(ptr));
if(i == blocks.end() || !i->contains(ptr, block_no))
throw Invalid_State("Pointer released to the wrong allocator");